Let us construct the BST shown in the above figure
root = newNode ( 10 ) NEW_LINE root . left = newNode ( 5 ) NEW_LINE root . right = newNode ( 50 ) NEW_LINE root . left . left = newNode ( 1 ) NEW_LINE root . right . left = newNode ( 40 ) NEW_LINE root . right . right = newNode ( 100 ) NEW_LINE