Qs : Pow(x,n) | Max overlapping intervals | String isPalindrome | k closest points to origin
Had 2 coding rounds as a part of the Virtual Onsite.
Was asked these qs in round 1 :
- https://leetcode.com/problems/powx-n/ - solved it with O(logn) complexity
- Find max overlaps given a list of ranges. Could not find the same problem on LC, but the ranges would be like in https://leetcode.com/problems/interval-list-intersections/, and was asked to find the max number of possible overlaps from the given range.
Wasn't able to solve this. The interviewer did give a hint that the range inputs could be sorted, but I could not complete in the given time.
Round 2:
- https://leetcode.com/problems/valid-palindrome/ - Gave an O(n) solution, interviewer seemed satisfied.
- https://leetcode.com/problems/k-closest-points-to-origin/ - was further asked to write code if the input was a stream of points and a discussion was done on the complexities in detail.
Was asked to write test cases for all the solved problems.
Previous interviews details : https://leetcode.com/discuss/interview-question/1632311/facebookmeta-vo-e5e6-product-design/1202237,
https://leetcode.com/discuss/interview-question/1582516/facebook-initial-phone-screen-online-square-sorted-array-random-probability-given-weights/1160072
Final result update : Was rejected :(
I felt I did quite well overall but probably they expect all the 4 questions to be properly answered in the coding rounds. The HR is not replying to anymore mails asking for detailed feedback, so why I was rejected will remain a mystery :/