I interviewed for L6 last Friday — I'm probably 80% sure I failed. It was with the Aurora team, and the interviewer ran the whole thing.
The interview was scheduled for one hour, but I got tortured for an hour and a half. Right off the bat the guy spent about 10 minutes introducing himself, then had me talk about a time I both challenged and simplified a system — the scope needed to be big enough. I talked about a recent project, and he dove into the details with me, extremely deep. At first I thought it was obvious where the simplification was, but after going back and forth diving deep, once I'd finally made it clear to him, he said: your project is decent, but there's something wrong with how you're expressing it. Okay... maybe so... By this point 40 minutes had already gone by.
Then the interviewer said, alright, let's do a problem — this one's not hard, it's simple. It was a variant of LeetCode 1993, but he described it in an extremely vague way. He said: you need to implement a LockingTree library that supports lock and unlock. The condition for locking is: if it's already locked, or any ancestor is locked, or any descendant is locked, you can't lock it. The condition for unlocking is simple: if it's locked, you can unlock it. Go implement it...
I really hadn't drilled this problem before. I didn't think to pass in a parent array to initialize the tree — I only thought of passing in a TreeNode, where each Node has a parent pointer and an isLocked flag, and I also thought about adding a hasDescendantsLocked boolean and DFS-ing the descendants. The interviewer kept interrupting me — this isn't efficient, how much time does this take, I said O(N), he said that's no good. We argued back and forth for a long time about this hasDescendantsLocked thing — thinking about it again today, I think the approach should be roughly the same, except instead of tracking a boolean you should track a count, but during the actual interview I really hadn't thought it through clearly. In the end the interviewer said, just write the brute force, so I did. Then he said, write some unit tests, so I described how each one should be written. After I finished describing them, he asked, so how do you initialize the tree? I struggled with that for a few more minutes, and by this point we were seriously over time. Anyway, I never did think of the parent array — maybe something like a serialized tree string, like on LC, would also work, but at the time I was pretty dazed. Overall the experience was not good. I'm 90% sure I failed. Posting this write-up right after.
Discussion
Loading comments…