Ad
  • Custom User Avatar

    yeah, you're right, sorry about that

  • Custom User Avatar

    You would be surprised how many people failed to come up with the solution. The fact something is basic for you doesn't mean it's basic for everyone.

  • Custom User Avatar

    Have you actually tried printing what that solution returns? Why do you assume the test is broken? there are over 700 passed solutions to this. Wouldn't it make more sense to assume it's your solution that is broken?

    Try building a tree provided as an example, and see if your solution prints the expected output.

    Hint: the result of a function in ruby is the last expression in it. in your case, it's

    sort_tree(node.right, acc)
    

    Do you think that call will return the expected call?

  • 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