Ad
  • Custom User Avatar

    nice kata

  • Custom User Avatar

    Oh, well, i thought i have misunderstood smth, but not smth so obvious. Thanks!

  • Custom User Avatar

    so its impossible to get right answer if we want numbers with same indexs

    Who said indexes have to match? You need to look for index in the 2nd sequence that has number that is also part of base sequence (the earliest match, obviously).

  • Custom User Avatar

    Is there some kind of a mistake?

    In base sequence [1, 2, 4, 8, 16, 22, 26] 26 is 7th.
    In sequence with seed 3 [3, 6, 12, 14, 18, 26] 26 is 6th, so its impossible to get right answer if we want numbers with same indexs.

    I thought this is part of the kata, but in sequence with seed 5 [5, 10, 11, 12, 14, 18, 26] 26 is actually also 7th, so the numbers have same indexs and are convergencing.

    Am I missing something?

  • Default User Avatar

    Not a performance issue. It's wrong. You'll find that it's wrong if you investigate what happens for a test that times out.

    Also: mark your post as containing spoilers

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution