YoE: ~5
Screening: Got a call from recruiter after resume screening
Round 1 (1.5 hr)
Basic questions regarding current project, experience etc.
Generic questions on load balancer, authentication vs authorization, DNS, what happens when one enters a URL in browser etc.
Given a MxN integer matrix, you need to convert all negative numbers to positive numbers in minimum number of passes.
In each pass, for a given positive number at (i, j) => negative numbers at location (i-1, j), (i+1, j), (i, j-1), (i, j+1) can be converted to positive number.
Approach: Gave a BFS based working solution.
Round 2 (1 hr)
Was informed that this would be a problem solving/LLD round but turned out to be a design round.
Approach: Gave an HLD on how the components should look like. Discussion moved to handling of requests at client side vs server side. Interviewer was looking at a solution around observer pattern. Wasn't able to make much progress here.
Approach: Proposed a stack based solution first. As the closeWindow operation would have needed O(N) time, so proposed an optimised solution using doubly linked list + Map. This would have ensured all the operations in O(1) time. The interviewer didn't seem too pleased with the added space complexity for the second solution.
Verdict: Rejected after Round 2. Overall a good experience.