Tip 1 : For Product based companies doing DSA is sufficient, But sometimes in the last round which is generally the Hiring manager round they can ask Core subjects as well so knowing core subjects like OOPS, CN, OS can be a plus point
Tip 2 : Practice as much DSA as possible.
Tip 3 : While solving a question make sure you know both the brute force and the optimal solution as directly giving the optimal solution to the interviewer can make a false impression that you already knew the question.
Tip 1 : Have a very detailed experience section as most recruiters read that section only. If you do not have experience add some big projects and clearly mention the tech stack used and any impact made by the project (for eg the app was used by 1000+ users.).
Tip 2 : Add open source contributions and hackathons won if any.
- Three coding questions need to be solved in 1.5 hrs. (from 7 pm to 8:30 pm)
- 2 questions were of easy difficulty and one hard.



1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Solved using the sort function two times.
and in second time passing the custom comparator to sort the last part in decreasing order.
eg :
sort(arr.begin(),arr.begin()+k);
sort(arr.begin()+k,arr.end,greater());



An element of one array can be mapped only to one element of the array. For example :
Array 1 = {“ab”, “dc”, “ab”, “ab”}
Array 2 = {“dc”, “ab”, “ab”}
The common elements for the above example will be “dc”, “ab”, and “ab”.

N = 3
K = 5
A = [ 1, 6, 7 ]
Biscuit 1 : Since there is only 1 cherry in this biscuit which is not greater than ‘K’, Ninja doesn’t like this biscuit.
Biscuit 2 : Since there are 6 cherries in this biscuit which is greater than ‘K’, Ninja likes this biscuit.
Biscuit 3 : Since there are 7 cherries in this biscuit which is greater than ‘K’, Ninja likes this biscuit.
Hence, Ninja likes 2 biscuits from this packet.
Instead of having two paths starting from 0,0 and then other path from N,N.
We can have two people starting from 0,0 and find two paths that collects maximum cherries.
First person finds the path to collect maximum cherries and mark those cherries collected then
Second person finds another path to collect maximum cherries.
Used recursive + Memo approach to solve this.
Face to face technical interview 1 (5pm : 60 mins)



The start time of one chosen meeting can’t be equal to the end time of the other chosen meeting.
'N' = 3, Start = [1, 3, 6], End = [4, 8, 7].
You can organize a maximum of 2 meetings. Meeting number 1 from 1 to 4, Meeting number 3 from 6 to 7.
Make two arrays for start time and end time.
Sort them.
Use two pointers to iterator start array and end array and calculate the max number of rooms required at any instance
Time : O(nlogn)



Two nodes of a binary tree are cousins if they have the same depth or level, but have different parents.
No two nodes in the given binary tree will have the same data values.

Calculate the depth and parent of both the nodes using DFS (in one go).
finally check parentof1!= parentof2 and depth is same
Face to face technical interview 2 (4pm : 60 mins)



If N = 2 and prerequisite = [[1, 2]]. Then, there are a total of 2 courses you need to take. To take course 1 you need to finish course 2. So, it is possible to complete all courses.
Used topological sort to check if it is possible or not.
Used bfs to traverse the graph and at the end if all the vertices were visited return true
Hiring manager round.
Define Paging

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?