Tip 1 : If you are applying for a company go through their previous asked questions.
Tip 2 : Be regular while practicing questions from online coding platform
Tip 3 : Need to have a better understanding of everything you mentioned in the resume.
Tip 1 : Keep it short and precise
Tip 2 : Mention in figures like how your contribution improved the existing system
The interviewer asked me to introduce myself and asked about my experience in my current company.



Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor.
Following is a simple O(n) algorithm to find LCA of n1 and n2.
1) Find a path from the root to n1 and store it in a vector or array.
2) Find a path from the root to n2 and store it in another vector or array.
3) Traverse both paths till the values in arrays are the same. Return the common element just before the mismatch.



Assume that the Indexing for the linked list always starts from 0.
If the position is greater than or equal to the length of the linked list, you should return the same linked list without any change.
The following images depict how the deletion has been performed.


To delete a node from the linked list, we need to do the following steps.
1) Find the previous node of the node to be deleted.
2) Change the next of the previous node.
3) Free memory for the node to be deleted.
This was the managerial round.
What is sharding?
Tip 1:Sharding is a very important concept which helps the system to keep data into different resources according to the sharding process.
Tip 2:Sharding makes the Database smaller
Sharding makes the Database faster
Sharding makes the Database much more easily manageable
Sharding can be a complex operation sometimes
Sharding reduces the transaction cost of the Database



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
Step 1:- Push the first element to stack.
Step 2:- Pick rest of the elements one by one and follow the following steps in loop.
Mark the current element as next.
If stack is not empty, compare top element of stack with next.
If next is greater than the top element, Pop element from stack. next is the next greater element for the popped element.
Keep popping from the stack while the popped element is smaller than next. next becomes the next greater element for all such popped elements.
Step 3:-Finally, push the next in the stack.
After the loop in step 2 is over, pop all the elements from the stack and print -1 as the next element for them.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: