Ad
  • Custom User Avatar

    From the description:

    If two numbers in the argument array have the same number of digits, return the first one in the array.

    10760 = 5 digits,
    17204 = 5 digits,
    95013 = 5 digits,
    6474 = 4 digits,
    42 = 2 digits

    So, the max amount of digits is 5. Since there are multiple that have length 5, take the one that comes up first. And that is 10760.

  • Default User Avatar

    Log
    [ 1, 10, 100 ]
    100
    [ 9000, 8, 800 ]
    9000
    [ 8, 900, 500 ]
    900
    [ 3, 40000, 100 ]
    40000
    [ 1, 200, 100000 ]
    100000
    [ 7000000, 10, 100 ]
    7000000
    [ 30744, 220584, 48, 58140, 155610 ]
    220584
    [ 14036, 0, 21889, 20880, 217080 ]
    217080
    [ 10760, 17204, 95013, 6474, 42 ]
    95013
    expected 95013 to equal 10760;
    Bro, what the hack?! Look at the last line. How should it work lol?