bst
I have a list containing 52431 elements, and another list with the same elements.
When I create my BST, the tree can be built.
But when I try to search for the number 4, I get a problem.
The issue is that when the root becomes 2, it only gets a left leaf (2 -> left).
But when I look at the path 5 -> 2 -> 4 on the right side, the 4 does exist, but not when 2 becomes the root.
4 Replies
⌛ This post has been reserved for your question.
Hey @mueoc! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Please format your code to make it more readable. For java, it should look like this:
the adding part
!solved
Post Closed
This post has been closed by <@423161233760452630>.