Overall the difficulty was pretty easy — too bad I failed this tech round.
Tech round: a tree problem. Each node has a value. For each node, you can pick either the current node's value, or the values of its children. If you pick the current node, you can't also pick its children — return the maximum value sum. The core of it is really just getValue(root): return max(getValue(root), getVal(root.children)). At the time I was going through a bit of a relationship crisis, hadn't really slept the night before, and my head wasn't clear. I wrote one solution, but it failed some test cases. The interviewer gave me a key hint (this is probably where I got dinged), and I rewrote another solution — took about 5 minutes and it passed all the tests. The follow-up was about complexity, plus what to do if the tree is disconnected — basically find all the disconnected tree roots and then take the max among them. There were about 10 minutes left but the interviewer didn't have me write the implementation, and kept saying we had plenty of time, no rush — I actually thought I'd passed...
The feedback I got later confirmed I failed this round — apparently my debugging was a bit too sloppy, relying on running the code over and over to find the bug, which didn't come across as solid enough.
HM round: a deep dive into one project — they spent about 40 minutes on it, and asked pretty deep questions. The interviewer was clearly technically strong — there was basically a new question every minute, and I had to be careful about every detail. There were also some basic behavioral questions, like whether I'd had an experience that felt frustrating — for these, pretty much any project I picked worked as an answer. The last 20 minutes were for me to ask questions, and it was a pretty pleasant conversation. I honestly thought I had this one locked in.
I felt like I did well in the HM round — I naturally talk fast, so even packing 40 minutes with content, there weren't any obvious holes. But I failed the tech round, and it really was a pretty easy problem.
Discussion
Loading comments…