Ad
  • Default User Avatar

    You should remove then tag "Binary Search Trees"

  • Default User Avatar

    Oh... yes - I think that's an open issue. Hope it's fixed soon ;)

  • Custom User Avatar

    Sorry, I should have read the description a bit more carefully. This was my fault for jumping to the conclusion it was a binary search tree. I'm not sure if making the members public in that case would help then.

    As for the error, It seems like it's not an error with your problem, but rather how codewars handles code that crashes (doesn't mark it as a failure).

  • Default User Avatar

    Hey!
    Test cases are using "equals" / "Equals" / "operator==" / JSON magic to compare the trees.
    The "..." in the description (after operator==) are there on purpose, just to let people know operator== is already defined and tree comparison is valid - I'll add that to the description as well.
    Which errors do you get?
    Also - I set the private fields as public (like other languages) - thanks for the feedback!

  • Default User Avatar

    Hi! This question refers to a binary tree (0-2 children), not a binary search tree

  • Custom User Avatar

    Feedback:

    • Instructions seem to ask for a binary tree, but it's not looking for a binary tree in the test cases
    • TreeNode description is cut off at operator== in the instructions
    • Errors/crashing results in a success
  • Custom User Avatar

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