Ad
  • Custom User Avatar

    Please reread the instructions. You are looking for the number which is not like all the other numbers in the string in terms of evenness or oddness. In other words you are looking for the single odd number or the single even number.

    eg:
    iqTest("1 2 1 1") => 2 // Second number is even, while the rest of the numbers are odd