Phone screen: LeetCode 1055
It was split into two parts. Part 1 only checks whether the target can be formed at all; once that ran and passed, I did the second part.
For Part 2 I first tried recursion + greedy, but it had a bug and couldn't guarantee the optimal solution. After fixing that I wrote a recursive version that passed. But the interviewer wanted an iterative approach, so the rest was the interviewer giving hints and us discussing. I wrote a two pointer + greedy solution, ran the test cases, and fixed a bug. In the end I went slightly over time while debugging, but they still let me pass.
Onsite:
(1) Coding 1: Escape Room
The problem came with an extra requirement from the interviewer: the incrementRoom() utility function had to be O(1). I didn't notice that when I first wrote it. The version I wrote ran fine, but increment wasn't O(1). The follow-up was a discussion of how to change the code / use other data structures to get O(1), and what trade-offs that would involve.
(2) Coding 2: Policy Violation
The interviewer pasted it in one part at a time, and after each part I ran it and got it passing before moving on to the next. Overall it went pretty smoothly. I just used a HashSet to store the parts that were really needed, with no over-engineering, and the interviewer's feedback on that was good.
After I finished 3 parts they didn't have me write the later parts, and instead we switched to discussion: whether all three sets were being compared, whether it could be optimized further, and if I received this code as a pull request, what I would ask the author to add.
(2) Design: Typeahead System
When I asked about scale during FR/NFR, the interviewer specifically emphasized starting from a lower scale and not worrying about a large number of concurrent users, but the service needed to be able to scale with demand. So I didn't use the Elasticsearch completion suggester and built an in-memory trie instead. We mainly discussed the trie read/write path, keyword score updates, rebuild and hot swap, the trie's internal implementation, and how to store keywords. The second half moved on to scaling up: how to scale the trie without bringing in any other external service, including things like sharding.
(3) Behavior:
The project intro was fairly short; we briefly talked about how to define success metrics. After that it was the usual behavioral questions:
- Leadership / how to communicate with other engineers
- If a team member is making slow progress, how do you handle it
- What are the characteristics of a good team? What are the signs of a poor team?
- Receive negative feedback + give others negative feedback
- handle conflict
- What is your strongest quality that helps you succeed in development?
(4) AI Coding:
I was given a project repo and had to follow the task to implement a read-through cache for a GET API to cut down on calls to ProductRepository, and at the end explain my overall approach. This round was pretty baffling; the interviewer barely said a word the entire time.
The recruiter had told me earlier that this round was newly added and didn't carry as much weight in the debrief, so I didn't really prepare for it, and that's exactly where I failed... The feedback was that I should have understood the problem and context better before prompting, and that my solution didn't solve the problem. It's hard to reconstruct which specific step went wrong, or where my prompts to the AI drifted away from what the question was asking. This rejection was pretty baffling. My advice is to dig up more material, practice more, and take this round seriously...
Overall the interview experience was still really good. None of the rounds left much time for Q&A, but from the limited exchanges I could tell the company cares a lot about open source + efficiency + scaling problems. After all, the company isn't that big, so if you can solve the problem within limited cost that's good enough, no need for over-engineering. The recruiter replied quickly, was very friendly, and was fairly transparent about giving feedback.
Moving on. If fate allows, see you around 👋
Discussion
Loading comments…