Nextdoor·Mobile Engineer·Technical Phone Screen
Jun 2026
Nextdoor mobile engineer interview with a tree/graph traversal problem centered on flattening nested comment threads. The follow-ups pushed into iterative rewriting which is where things got interesting.
- Given a post with nested comment threads where each comment can have child comments at arbitrary depth, flatten the entire structure into a single array using depth-first search.
- How would you modify your solution to stop traversal beyond a certain depth level?
- Rewrite your recursive DFS solution iteratively using an explicit stack instead of recursion.
“My recursive solution came out clean enough but I fumbled explaining why DFS specifically made sense here versus BFS.”