Tip 1 : Start as soon as possible at least 3-4 months before starting of 3rd year in college.
Tip 2 : Do not hesitate to look for solutions on YouTube or any other platform. Even if you solved a question then also try to look for other optimal solutions. It is very helpful during interviews.
Tip 3 : Try to do questions from leetcode, interviewbit (highly recommended).
Tip 4 : I want to highlight tip 3 again. I have done interview bit till 50000 point and recommend others to do same.
Tip 5: Try to have at least 2 projects (1 major and 1 minor) or if you have 1 major project then it should be full fledged i.e. frontend backend fully implemented.
Tip 1: Read your resume thoroughly. You should know everything mentioned in your resume.
Tip 2: Try to put your resume more on technical side (try to include technical achievements)
Tip 3: Try to be precise and keep it in single page only.
Round 1 started in morning at around 10 am. It began with formal introduction of mine and also the interviewer. Due to covid lockdown I have to give it from my home. Interviewer was very chill and nice. Also level of questions asked is easy.



An element is called a peak element if its value is not smaller than the value of its adjacent elements(if they exists).
Given an array arr[] of size N, Return the index of any one of its peak elements.
Brute approach : Linear traversal.
Optimized approach : Binary Search.



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
In this I got some time to think of solution. I can't think of brute solution in this one. So, I go on with optimal solution using stack.
This round started after half an hour from first round. In this round also interviewer was calm and chill.



1. If you encounter a situation when 'B[i]' is greater than the number of remaining nodes in the list, then simply reverse the remaining nodes as a block and ignore all the block sizes from 'B[i]'.
2. All block sizes are contiguous i.e. suppose that block 'B[i]' ends at a node cur, then the block 'B[i+1]' starts from the node just after the node cur.
Linked list: 1->2->3->4->5
Array B: 3 3 5
Output: 3->2->1->5->4
We reverse the first block of size 3 and then move to block 2. Now, since the number of nodes remaining in the list (2) is less than the block size (3), we reverse the remaining nodes (4 and 5) as a block and ignore all the block sizes that follow.
I have made a reverseHelper function which takes starting and end nodes from a group of k size and then attach this reversed group in front of dummy node. Similarly, did this for all groups of k.



If 'N' is 5 and 'K' is 3 and the array is 7, 2, 6, 1, 9
Sorting the array we get 1, 2, 6, 7, 9
Hence the 3rd smallest number is 6.
Brute : Sort the array and return element at (k-1)th index.
Optimal : Used priority queue or heap.
This was HR + technical round. Interviewer was super chill. This round happened at around 1:00 pm. In this round there was project discussion and 1 coding question.
Do remember to thoroughly read your project.



The order in which the groups and members of the groups are printed does not matter.
inputStr = {"eat","tea","tan","ate","nat","bat"}
Here {“tea”, “ate”,” eat”} and {“nat”, “tan”} are grouped as anagrams. Since there is no such string in “inputStr” which can be an anagram of “bat”, thus, “bat” will be the only member in its group.
I have used sorting and hash map to solve the problem. For each word, I first make a temporary copy of the word, sort the copy and store the original word in map[copy]. In this way, all anagrams for given word can be found out easily.

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?