Ad
  • Default User Avatar

    Everytime I come here, I am abused.

  • Custom User Avatar

    i beleave one of the tests has a mistake in C version, my numbers are 4096000 and the results are 409600 every other test passes except for this one, does anyone know if the problem is my code or if there is a mistake of some kind

  • Custom User Avatar

    Not an issue, use System.out.println. Also, you probably should read the section of the docs about training on kata.

    Cheers

  • Default User Avatar

    Java17, 2 start test complete, other 3 NULLPOINTEREXCEPTION, what te hell??? Let me even see what commands do you enter in this class

  • Custom User Avatar

    1-st 2 kyu kata in my life! Thanks for this xp, that was awesome. :)

  • Default 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

  • Default User Avatar

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

  • Default User Avatar

    No, by entire array I meant that if the array has length n, his code runs through 2n elements on average.
    I presume you took the time results provided by the test cases which deviate in general, that way the claim can be made either way. If you just run both versions in a properly timed environment you get mine to be about 3x faster, regardless of whether they lists are fully randomized or worst case samples.

  • Custom User Avatar

    He traverses the entire array at most one time.

    This solution is faster than your solution: random tests in 390ms vs 450ms.

  • Custom User Avatar

    Is it normal for the C++ "Complex 1" test to be so long? It seems to make nested loops with so many iterations that my program ends up in a timeout. The program is {"mov a 1", "mov b 1", "mov c 0", "mov d 26", "jnz c 2", "jnz 1 5", "mov c 7", "inc d", "dec c", "jnz c -2", "mov c a", "inc a", "dec b", "jnz b -2", "mov b c", "dec d", "jnz d -6", "mov c 18", "mov d 11", "inc a", "dec d", "jnz d -2", "dec c", "jnz c -5" }.

    When I test it with a lower value of d for the 4th instruction, the program manages to finish before timing out. For example, with mov d 13, I get [ ("c", 0), ("b", 377), ("d", 0), ("a", 808) ] as a return.

    EDIT: Nevermind, for some reason now it works... I guess the servers were a bit too busy at some point.

  • Default User Avatar

    I've managed to implement this in JS, and seem to have the right answer for the first test, but my map is not being accepted Any suggestions why this is happening, and how I can get around it?

    my return: Map(1) { 'a' => 1 }
    expected Map{} to deeply equal { a: 1 }

  • Default User Avatar

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

  • Custom User Avatar

    Loved this Kata! (Swift version)
    My solution is way over engineered: I ended up creating a full Tokenizer -> Parser -> Interpreter chain. But it was great fun. And something I wanted to explore anyway. Thanks for creating this Kata!

  • Default User Avatar

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

  • Loading more items...