Tip 1 : Prepare some Projects
Tip 2 : Practice At least 250 Questions of DS algo
Tip 3 : Do at least 2 application based projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
ALGO, Aptitude, SQL
This round lasted for 45 min. Started with the introduction later he asked me from my projects mentioned in the resume then from the OOPS after that i was asked to share my screen and 2 dsa problems were given.



1. If the size of the linked list is 1 then return the head
2. Find mid using The Tortoise and The Hare Approach
3. Store the next of mid in head2 i.e. the right sub-linked list.
4. Now Make the next midpoint null.
5. Recursively call mergeSort() on both left and right sub-linked list and store the new head of the left and right linked list.
6. Call merge() given the arguments new heads of left and right sub-linked lists and store the final head returned after merging.
7. Return the final head of the merged linkedlist.



The length of the smallest valid substring '()' is 2.
'STR' = “()()())” here we can see that except the last parentheses all the brackets are making a valid parenthesis. Therefore, the answer for this will be 6.
1) Create an empty stack and push -1 to it.
The first element of the stack is used
to provide a base for the next valid string.
2) Initialize result as 0.
3) If the character is '(' i.e. str[i] == '('),
push index'i' to the stack.
2) Else (if the character is ')')
a) Pop an item from the stack (Most of the
time an opening bracket)
b) If the stack is not empty, then find the
length of current valid substring by taking
the difference between the current index and
top of the stack. If current length is more
than the result, then update the result.
c) If the stack is empty, push the current index
as a base for the next valid substring.
3) Return result.

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?