Find two elements with given sum in BST- expected answer in O(n) time ans O(1) space complexity. Java OOPS Singleton, Synchronized and Puzzles
Anonymous
Convert BST to DLL (sorted), and find the pair in linear time.
Check out your Company Bowl for anonymous work chats.