Status: ~4 YOE
Position: SWE at Non-FAANG
Location: London
Date: March 2022
Just 1 min of sharing introductions and then we jumped to coding straight away.
https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/
There was one variation though that parentheses can be imbalanced too and in that case have to return -1.
Initially, I coded using a stack in O(N) time but he told can you improve it, so I understood that as there are no other types of brackets we can do it in constant space and changed the code accordingly.
Then came followups, like what if there are other kind of brackets, what if I need depth only when there's a character inside a closed a pair of parantheses and not otherwise etc.
All followups were only discussed without making any code changes.
https://leetcode.com/problems/merge-intervals/
As it is, so did it optimally without any trouble.
Waiting for results, fingers crossed.
Tips and Observations - As questions float around variations of Easy and Medium generally you don't need a lot of time for coding once you've had the right discussion with interviewer, so don't worry about time constraints too much, do good discussion about various approaches, come to a settlement and then code peacefully with clarity, you'll be able to finish in time.
Wish me luck. Thanks and All the Best!
Update:
Going for Onsites :)