3 ms·
Yeah. If he's capable of building good stuff, but couldn't invert a binary tree, it suggests strongly that he didn't even bother to do a minimal amount of prepa
by ss108 4y ago
Yeah. If he's capable of building good stuff, but couldn't invert a binary tree, it suggests strongly that he didn't even bother to do a minimal amount of preparation, and Google is not unreasonable at all to want to filter out people who don't do that.
- slotrans 4y agoin 17 years of professional software development I've used a binary tree exactly zero times
- Existenceblinks 4y agoSame. I wrote many AI stuff during 2007-2011. After that, in industry, I use Boolean Algebra Simplification once to undo if-else hell of legacy code. It's always fixing tooling shit and third party apis/accounts/permission madness. No way I can balance a AVL tree now (give me at least 3 days)
- ss108 4y agoThat's not the point. The point is that if someone can't do some of the easier Leetcode style problems, they probably didn't try to prepare at all, and that can be viewed as arrogant or lazy. I'm not disputing that binary trees might not be the most practical topic (especially inverting them). However, given that one knows that is the sort of coding interview Google conducts, one should reasonably be expected to practice that sort of interview. Inverting a binary tree isn't hard; it doesn't take much practice with binary trees to realize how to do that. So if someone can't do that, they probably didn't practice at all. And if someone didn't practice at all, an employer is acting within reason if they draw some negative inferences from that.
- alphazard 4y agoMaybe you've never used a binary tree on the job to store information. If you've ever written a recursive function with two recursive calls, the call graph is a binary tree. The interview problem "invert a binary tree", is more of a litmus test for understanding recursion, which is a fairly basic knowledge item for an SE.