Google L3 || Rejected , Can't Understand.
Y.O.E = 1 year.
Hey Guys , Giving back to the community , but , feeling really heavy and Bad.
Telephonic Interview - I should've failed here, because I could only give n^2 solution. But I dont know how I got a nice feedback here.
Ques - Given an Array , find and remove an element , such that after removing it , remaining two parts have equal sum.
After a week , I got a call saying I am moved to other rounds.
Onsite - It was question based around Priority Queues.
We had to design an API to insert a person with score and name.
And we had to design a get method so that the person with highest score is returned , and the person is not returned twice.
I gave my Priority Queue approach O(logN) , and implemented it , There were few bugs as told by interviewer and I fixed them quickly.
Onsite - Interviewer joined late, Gave me a question a variation of merge intervals
You are given a string consisting of characters 'A', 'B', and '-', representing a sequence of positions on a line. Each 'B' represents a point that emits a harmful effect in both directions up to a certain radius r. The index of each 'B' in the string is denoted by c.
For each 'B', the positions from c - r to c + r (inclusive) are considered unsafe. All other positions are considered safe.
Given the string and the radius r, return the list of intervals (or index ranges) that are safe, i.e., not affected by any 'P'.
At first I was confused , but as soon as they said ,look for the bad intervals , It clicked and I coded up the solution , While writing last return loop , they said Time's up even after they joined late.
But I thought its alright because we've solved the problems and told them the time and space complexities which were O(nLogn) and O(n).
Soon after I got the feedback saying no further rounds to be conducted and the result of both rounds were negative.