Applied for SDE II at Amazon. Virtual round (~60 min): 1 coding + 1 LP.
Coding: Number of Atoms (LC 726)
- Clarified input + edge cases, explained approach, then coded the
stack-of-maps solution (push a map on "(", on ")" multiply popped map by
the count and merge down, parse atoms + counts while scanning, sorted
output via std::map). It worked.
- Interviewer kept pushing for the optimal solution. Stack-of-maps is O(n^2)
due to repeated merges; I couldn't get to the better approach in time and
ran out of time.
LP: 1 behavioral question (Dive Deep), standard STAR with follow-ups.
Verdict: Rejected