Tip 1 : Be consistent.
Tip 2 : For DSA try to solve a good mix of medium and hard level problems
Tip 1 : Try to align your resume with contents mentioned in Job description of position you are applying to
Tip 2 : Keep it to the point. Don't give too much description. Mentions in points if needed.
There were 3 DSA questions, 2 medium and 1 hard. Enough time was given to solve all the three questions. All test cases passed.


Note that if Ninja reaches a particular stop with no fuel, it can still fill his tank at that stop and continue his journey ahead. Similarly, if he reaches his destination with no fuel, it is still considered to have arrived.
Given X = 10, Y = 4, ARR[Y] = {[1, 6], [2, 3], [3, 3], [6, 4]} and Z = 1
So the path followed in this case would look like this:
Ninja starts with 1L of gas.
Drives to the first gas station at position 1, using 1L of gas, then refueling with 6L of gas.
Then, drive to position 6, using 5L of gas, then refueling 4L in the current 1L of gas, making it a total of 5L of gas.
Finally, drive to the destination consuming 4L of gas.
So, Ninja made 2 refueling stops before reaching the destination. So, you need to print 2.
Used max heap to keep track of the maximum amount of refill that can be taken after reaching petrol stations. Whenever need to refill would require would pop up from heap and reinitialise the tank capacity of car.
Data Structure and Algorithms
2 questions + a follow up question as time was left



1. Each student gets at least one book.
2. Each book should be allocated to only one student.
3. Book allocation should be in a contiguous manner.
Input: ‘n’ = 4 ‘m’ = 2
‘arr’ = [12, 34, 67, 90]
Output: 113
Explanation: All possible ways to allocate the ‘4’ books to '2' students are:
12 | 34, 67, 90 - the sum of all the pages of books allocated to student 1 is ‘12’, and student two is ‘34+ 67+ 90 = 191’, so the maximum is ‘max(12, 191)= 191’.
12, 34 | 67, 90 - the sum of all the pages of books allocated to student 1 is ‘12+ 34 = 46’, and student two is ‘67+ 90 = 157’, so the maximum is ‘max(46, 157)= 157’.
12, 34, 67 | 90 - the sum of all the pages of books allocated to student 1 is ‘12+ 34 +67 = 113’, and student two is ‘90’, so the maximum is ‘max(113, 90)= 113’.
We are getting the minimum in the last case.
Hence answer is ‘113’.
Used binary search between books with minimum number of pages and total pages in all books (in case only one student is there). Then using BS searched for a minimum value where all would get to read atleast one book.
Some hard and some Intermediate Data Structure and Algorithms problems were asked.



Implement a Trie Data Structure which supports the following two operations:
Operation 1 - insert(word) - To insert a string WORD in the Trie.
Operation 2- search(word) - To check if a string WORD is present in Trie or not.Wrote a recursive solution to backtrack to upper levels. And DFS/BFS to travel to lower levels. Questions were asked around why choose DFS/ BFS.
This was a hiring manager round and my resume was discussed.
Tell me about yourself.
What are your greatest strengths and weaknesses?
Why should we hire you?

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?