Online Coding Test (Hackerrank): Questions were of Easy, Medium, and Hard level, 4 questions in total you need to solve in 1.5 hrs.
Round 1(On-site, virtual):
- Collect maximum points in a grid when you move from top left to bottom right. You can only move towards right and in downward direction. The grid can contain both positive and negative values. Both the approach and the code were expected.
- Find the Lowest common ancestor of a binary tree.
- Find the maximum contiguous sum in the array.
Round 2 (On-site, Virtual):
- Space optimization and calculation related question : How will you store the pin codes of different locations with the location name and their respective Pincode. Discussed different approaches and complexities.
- Alien Dictionary problem. Asked for the failure conditions in the solution and the approach
- Building Bridges problem.
- Given function f6(), that returns the number between 1 and 6 randomly. All the numbers are returned with equal probability, how will you write f12() function using f6(), which will return the numbers randomly between 1 and 12, all with the same probability.
Hint: think of making f3() function then, try making f12() function.
Round 4 (Hiring Manager round):
- Let’s assume we have three types of packets pen of 6 9 20. I can only sell a full packet. Given N tell me if N is saleable or not?
- He extended the first question to tell the minimum number of total packets required if you want to sell X pens.
- Design question related to Medicine inventory design. If any medicine is becoming less than threshold quantity in stock, the alarm should be raised so that the owner of the shop may know that he needs to order that particular medicine again. Asked about storing the data and the structure.