Find a pair in BST with a given sum. If not present return -1.
Anonymous
We can store inorder traversal of BST in an array. this will give us sorted data then using two-point method we can find a pair in it.
Check out your Company Bowl for anonymous work chats.