How to check if a given Tree is a Binary Search Tree in Java? Example Tutorial
July 28, 2022
0
Hello guys, if you are preparing for a coding interview then you may know those binary tree problems are not easy to solve on coding interviews and I have seen many candidates struggling to do post-order traversal and checking if a given binary tree is a binary search tree or not. If you want to succeed in the coding interview, you need to prepare well on binary trees in general. One way to prepare better is solving common binary tree coding problems like this one, where you need to find if the given tree is BST or not. There are a lot of things that would tell us if a tree is a binary search tree. But before we get to that, we need to understand what a binary tree is.