You are given pointer to the root of the binary search tree and two values and . You need to return the lowest common ancestor (LCA) of v1 and v2 in the binary search tree. In the diagram above, the lowest common ancestor of the nodes 4 and 6 is the node 3 . Node 3 is the lowest node which has nodes 4 and 6 as descendants. CODE… Read more
The TCS National qualifier test (NQT) was conducted on August 2019 and I got a mail saying I had qualified the test. After few days, I got the mail with the interview details on 2-3 days later they sent the mail and it really gave me very less time for the interview but my technical… Read more
Follow My Blog
Get new content delivered directly to your inbox.