Is This a Binary Search Tree?

  • + 4 comments

    Consider the below 2 types of trees, you will know where you went wrong.

    Case 1 :

       20
      /  \
     10   2
    

    Case 2:

       18
      /  \
     8    20
         /  \
        10  30