Ad
  • Default User Avatar

    Very cool kata! Super satisfied once solved. It's one of the rare katas I've seen that forces using a better data structure.

    Thank you author!

  • Default User Avatar

    Never mind. I figured out my error. But it seems the the message is misleading and it flippled the "Expected" and "Instead got".

    This is a fun kata and it really helped me refresh my knowledge about the BST.

  • Default User Avatar

    I can't figure out why I can't pass this test for toArray [ 8, 6, 15, 2, 7, 10, 23, 1, 4, 6, 7, 8, 10, 20, undefined, 1, 1, 3 ] in the attempt.

    The error message I got was:
    Expected: '[1, 1, 1, 2, 3, 4, 6, 6, 7, 7, 8, 8, 10, 10, 15, 20, 23]', instead got: '[1, 1, 1, 2, 3, 4, 5, 6, 6, 7, 7, 8, 8, 10, 10, 15, 20, 23]'

    I printed out my result right before I return it and actually got the correct result. It's mysterious where that extra "5" comes from. I even tried just returning the expected result as the only statement in the function, and it still gives me the same error for that test.

    Does anyone got the same issue or is it just me?

  • Default User Avatar

    Very nice and challenging kata! Took me a lot of thinking to solve this.

  • Default User Avatar

    Nice kata! It'll be more challenging if duplicate is not allowed.

  • Default User Avatar

    Nice kata! I enjoyed solving it.

  • Default User Avatar

    Test case is incomplete. You should make sure all paths with all the border cases for checking 5 are covered in the random tests. I had a solution that passed all the tests and submitted it, but then when I tried again I had one error out of the 160. That's how I realized the fault in your random tests.

    Other than that, I like this kata so I gave it an upvote.

  • Default User Avatar

    Same here. I just get down to exactly 138. Have you got progress in the past few months?

  • Default User Avatar

    Thanks for the great kata! I'm very satisfied when finishing this one. There is a bit of math that I needed to work out on a few pieces of paper.

  • Default User Avatar

    This is a very nice kata and I learned a lot. My original solution worked within time limit, but it was too lengthy and not straightforward. I read the clever solutions from others and started a new solution. It was neat and faster!