What is wrong about my code which checks whether a binary tree is BST (binary search tree ) or not
In-order traversal of BST is in ascending order. I’m using this fact to check for valid BST. If minNum
which is the previous node data is greater than the curr node it means it’s not the valid BST. I’m not sure what I’m doing wrong. I recursively go to left node , then check above said condition then go to right node and repeat this to traverse the whole tree.
Please tell me what I’m doing wrong and I don’t want any other method of solving this problem.
Thanks
Binary Search Implementation with ceil in wikipedia
enter image description here
delete method for BST not working in java
The delete method only works when i delete the root node of a BST and I dont see the reason why.