Two back-to-back interviews.
The first round was with one interviewer who went straight into coding. The problem was similar to LeetCode 588, Design In-Memory File System, but with richer requirements: it also had to support path lookup, deletion and so on. I didn't finish it.
My approach was to use a trie to simulate the file system, with each directory or file name along the path as a node and a hash map holding the children. For lookup, I walk the path level by level. For deletion, I find the parent directory and then remove the corresponding child node.
The second round was with another interviewer, and the question was LeetCode 617, Merge Two Binary Trees. This round went fairly smoothly and I managed to write it out by hand successfully.
Overall it felt pretty hard, especially the first round. It wouldn't be surprising if I get rejected. I did my best 🥲
Discussion
Loading comments…