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. CODEContinue reading “Least Common Ancestor (LCA) problem.”

# Category Archives: Uncategorized

## TCS NQT 2019 Off Campus Interview experience

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 technicalContinue reading “TCS NQT 2019 Off Campus Interview experience”

## Depth First Search Algorithm implementation in Java.

Depth First Search(DFS) Algorithm is used for the graph traversal and it internally uses a stack which follows LIFO(Last In First Out) principle. In DFS we are trying to go away from the starting source vertex into the graph as deep as possible until we have to backtrack to the preceding vertex. Initially all theContinue reading “Depth First Search Algorithm implementation in Java.”

## Tensor Processing Unit (TPU) technical paper.

A Tensor Processing Unit (TPU) is an Accelerator Application-Specific integrated Circuit (ASIC) developed by Google for Artificial Intelligence and Neural Network Machine Learning. With Machine Learning gaining its relevance and importance every day, the conventional microprocessors have known to be unable to effectively handle the computations be it training or neural network processing. The 1stContinue reading “Tensor Processing Unit (TPU) technical paper.”