This was for a Senior general SDE role, so there were two phone screens. Both were known questions. I had prepared every question in the question bank, written each one out once, and prepared all the follow-ups. I don't think there should have been any problems with my answers.
Merge weekday time intervals: I could define the input and output formats myself. I chose ["Mon 09:00", "Mon 17:00"].
In-memory database: The follow-up was to add transactions/savepoints. My approach was to take a snapshot first, then record only each entry's changes.
This was my first interview recently. I solved both problems and ran all the test cases or evaluations, though I wasn't especially fast at writing the code. A few days later, HR sent a rejection email with the standard template: "while we were impressed with your performance, we have decided to move forward with another candidate".
Here is the full Nextdoor question bank:
- Santa's gifts
- Comment tree
- Photo feed grouping
- Compare version numbers
- Transactions: a new question, with detailed coverage on PracHub. Fairly difficult, involving a small state machine.
- Merge intervals
- In-memory database
If you're preparing in advance, I suggest preparing all of them. Don't count on getting lucky.
Discussion
Loading comments…