Tip 1 : Make sure you have your computer science fundamentals very clear.
Tip 2 : You should know the complexity of the code you write and should know the internal implementation of the data structure you use while coding.
Tip 3 : You should know about everything you write in your resume.
Tip 4 : Practice a lot of programming problems. Participate in competitive programming contests.
Tip 1 : Be honest about what you write in your resume.
Tip 2 : Should have at least 2 projects
Tip 3 : Maintain a precise and self-speaking one-page resume.
Tip 4 : Add technical achievements only.
This round was conducted on chime and started with my introduction and current project. After this interviewer inquired about a time when I have to do some unexpected complex work and how I handled the situation.



1. A binary tree is a tree in which each node can have at most two children.
2. The given tree will be non-empty i.e the number of non-NULL nodes will always be greater than or equal to 1.
3. Multiple nodes in the tree can have the same values, all values in the tree will be positive.
Idea is to perform Depth-First Traversal on the tree (either Inorder, Preorder or Postorder) using a stack and checking if the Left Child is a Leaf node. If it is, then add the nodes value to the sum variable



1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.
2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).
2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
The idea is to use a LinkedHashSet that maintains the insertion order of elements. This way implementation becomes short and easy.
This round was conducted on chime and also started with my introduction and current work.



1. We consider the ‘/’ operator as the floor division.
2. Operators ‘*’ and ‘/’ expression has higher precedence over operators‘+’ and ‘-’
3. String expression always starts with ‘(‘ and ends with ‘)’.
4. It is guaranteed that ‘expression’ represents’ a valid expression in Infix notation.
5. It is guaranteed that there will be no case that requires division by 0.
6. No characters other than those mentioned above are present in the string.
7. It is guaranteed that the operands and final result will fit in a 32-bit integer.
Consider string ‘expression’ = ‘((2+3)*(5/2))’.
Then it’s value after evaluation will be ((5)*(2)) = 10.



In the case of two closest sums, print the smallest sum.
1) Sort all the elements of the input array using their absolute values.
2) Check absolute sum of arr[i-1] and arr[i] if their absolute sum is less than min update min with their absolute value.
3) Use two variables to store the index of the elements.
In This round was 30 mins were consumed by the behavioural questions, He wanted detailed and deep answers.



L1 = 1->2->3->4->7
L2 = 2->4->6->7
ANSWER:- The answer should be 2->4->7 because 2,4, and 7 are present in both the linked lists.
This method uses two pointers to return the common node with the help of the following steps:
Initialize two pointers ptr1 and ptr2, at the head1 and head2.
Traverse through the lists, one node at a time.
When ptr1 reaches the end of a list, then redirect it to the head2.
Similarly, when ptr2 reaches the end of a list, redirect it to the head1.
Once both of them go through reassigning, they will be equidistant from the collision point.
If at any node ptr1 meets ptr2, then it is the intersection node.
After the second iteration, if there is no intersection node, it returns NULL.



1. The given node 'TARGET_NODE_VAL' is always present in the tree.
2. The value of each node in the tree is unique.
3. Notice that the Kth ancestor node if present will always be unique.
First we will get an element whose ancestor has to be searched and from that node, we will decrement count one by one till we reach that ancestor node.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?