Ad
  • Custom User Avatar

    Ahh, I felt rather stupid for not knowing what was up here for a few minutes. I did not realise infinite iterators would be tested.

  • Custom User Avatar

    Attempting to use something like this doesn't work on the number iterator:
    for i in range(len(xs)):
    if arr[i] = item and i != len(xs) - 1:
    return arr[i+1]

    Pretty close.

  • Custom User Avatar

    in the Python version of this kata, you have to deal with infinite sequences, so your list() call never terminates.

    it does make the Python version not adapted for 8 kyu, but this has already been raised

  • Custom User Avatar

    hello, suggestions are meant for proposing improvements to the kata, not giving hints to other users (that would be a spoiler)

  • Custom User Avatar

    The problem is that you are given iterators which can be infinite but your first step is to copy them into a list. That will never terminate. Try to find a solution which only uses the iterator (so called "lazy").

    One could add to the description that you have to handle infinite sequences.

  • Custom User Avatar

    Can't solve the Kata couse i keep getting timeout errors in testrun. Don't understand whats causing the error cause my code
    looks quite similar to de solutions..

  • Custom User Avatar

    You're asking for it. Fine. You earned it.

  • Custom User Avatar

    OK, it's 8kyu because it's underrated, and the intent of the OP is that it should handle infinite sequences.

    The kata should be checked in all languages to see if it tests with those ( if it doesn't, add that; if that can't be done, remove the translation ), and the description should include that little factoid - and specs of what "sequences" will be actually tested with.

  • Custom User Avatar

    Just so you know, on a short string ("Success") this solution executes in 49 ns, and your solution in 189 ns.

    Asymptotic complexity is not so relevant with short inputs.

  • Custom User Avatar

    I'ts a nice kata but i think its bit more complicated than 8kyu. its like 7 or 6

  • Custom User Avatar

    "help pls" is not a valid kata issue. The issue is in your code.

    I ran your code snippet, and it runs into allocation errors (because you're trying to create an array from an infinite iterator). This is a bit more difficult than 8kyu in JS, and you need to handle infinite sequences correctly.

  • Custom User Avatar

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

  • Custom User Avatar

    Time complexity? I prefer to think of it as giving my computer a thorough workout!

  • Custom User Avatar

    VSCode lacks sufficient testing coverage

    try comparing your failed test cases for a commonality

  • Custom User Avatar

    Solution for JS passes all tests in VSCode, but crashes when attempting it here? Why?

  • Loading more items...