Got a referral from a connection on LinkedIn and after submitting the resume on their portal, got the hr call very next day.
Round 1(F2F DS Algo round): 2 question -> 27/10/21
Question 1: Given an parent array, containing info who is the parent for this index node, give
the max score if current index node is removed from the tree. Score is calculated as product of all the disconnected tree size.
Eg: parent : [-1,2,0,2,0]
So tree will be something like this
0
4 2
3 1 So score for 0 indexed node is:
0-> 1*3
Gave the answer by first finding the no of child nodes present for each node and then multiplying the left subpart to right subpart to the no of nodes other than current subtree. Interviewer was surprised and seems like was expecting a different logic but was happy with my answer. Gave a dry run and it was running on all edge cases.
Question 2: For an unsorted array, calculate the sum of minimum of all the subarray.
Gave a logic of finding how many times a number is smaller than elements in left side and then same in right side and then summing the both and multiplying with original number. Interviewer seems okay with the logic.
Got confirmation of selection 1 week later and next round was scheduled 1 week later.
Round 2 (System Design round): 1 question 11/11/21
Question: Design a service similar to Google calender. Discussed my whole approach. Took whole hour. Missed a few things but interviewer was impressed with few new ideas. Interview looks positive on whole.
Update: Got the rejection call as well as mail. No elaboration on what was lacking or reasons of rejection.