Let us construct the BST shown in the above figure
struct Node * root = newNode ( ' A ' ) ; root -> left = newNode ( ' B ' ) ; root -> right = newNode ( ' C ' ) ; root -> right -> left = newNode ( ' E ' ) ; root -> right -> right = newNode ( ' F ' ) ; root -> right -> left -> left = newNode ( ' G ' ) ; root -> right -> left -> left -> left = newNode ( ' I ' ) ; root -> right -> left -> left -> right = newNode ( ' J ' ) ; root -> right -> right -> right = newNode ( ' H ' ) ; root -> right -> right -> right -> left = newNode ( ' K ' ) ; char k = ' H ' ; cout << " Distance ▁ of ▁ the ▁ closest ▁ key ▁ from ▁ " << k << " ▁ is ▁ " << findClosest ( root , k ) << endl ; k = ' C ' ; cout << " Distance ▁ of ▁ the ▁ closest ▁ key ▁ from ▁ " << k << " ▁ is ▁ " << findClosest ( root , k ) << endl ; k = ' E ' ; cout << " Distance ▁ of ▁ the ▁ closest ▁ key ▁ from ▁ " << k << " ▁ is ▁ " << findClosest ( root , k ) << endl ; k = ' B ' ; cout << " Distance ▁ of ▁ the ▁ closest ▁ key ▁ from ▁ " << k << " ▁ is ▁ " << findClosest ( root , k ) << endl ; return 0 ; }