• Custom User Avatar

    See my comment above for user noqwA (I hope moderator will not find it somehow inappropriate). Are there some tips.

    Generally do NOT! do list of n elements - n times :D. Technically you not need to iterate more time than the "rest" of those numbers what you have.

    So n = 7. First you iterate 7 times, secondly 6 times, ... because one number is each iteration removed.

  • Custom User Avatar

    My code also timed out…… So sad

  • Custom User Avatar

    so im very annoyed my code passes all 38 tests, and times out on the very last one: josephusSurvivor(4687, 4892)
    man this is unfair :D no clue how to optimize rip

  • Custom User Avatar

    ye i have no clue what to do here lol
    also hate that i cant "give up" and be able to see solutions to learn

  • Custom User Avatar

    what if input of N is odd number? it wont have a direct opposite

  • Custom User Avatar

    i got this error:

    Expected objects to be the same.
    Passed in:
    (table) {
    [1] = 88
    [2] = 12
    [3] = 225 }
    Expected:
    (nil)

    can someone explain? i thought instructions said they only pass tables with strings, not numbers