Hacker News new | ask | show | jobs
by Eddygandr 1032 days ago
Didn't the guy who made Homebrew fail his interview at Google because he couldn't invert a binary tree? That's a guy who has built a popular product in the wild and can clearly code but failed because of the leetcode barrier at all IC levels.
5 comments

If you can’t invert a binary tree, how can I trust you to change my website’s favicon?!
You would be surprised how hard it would be to invert a binary tree, or really just what the question is asking for, if you didn't at least study up on the concept in the last decade. It is conventional enough to sound mundane, but how often are we inverting binary trees in practice?
It came out that by inverting a binary tree just meant swapping the left and right children of all nodes of the tree. It's pretty much 'can you iterate through a tree?' which comes up a surprising amount.
Sure, but try coming up with that without even remembering what invert meant (it isn't a word that is commonly used in practice outside of CS education and l00tcode). Most of the problem in l00tcode question is just figuring out what is being asked for, not in doing the ask. That's why studying and understanding lots of l00tcode problems as prep is very effective (even if you haven't seen the problem, the problem is probably adjacent and you can understand it more quickly during the interview).
you can always ask interviewer - define invert what does it mean - and interviewer in 100% cases will explain and even provide test cases.

in fact any candidate that doesnt ask clarifying questions and goes deep into coding right away - has a chance of going into wrong direction and is flagged as red flag.

As an interviewer I always lookout for candidates that dont ask questions, dont start with test cases, assume in their mind what is their understanding of ideal solution - and start coding. These are very inexperienced people who do that

'Invert' is a pretty common word.
Yes but is it Referring to the additive or multiplicative inverse?

Or maybe it’s making the tree upside down, so all leaves become roots, and the root becomes a leaf. But when we do that, do we just invert all the edges or transform the whole tree?

Maybe it’s referring to changing a red-black tree into a green-white tree? Or turning a splay tree into a merge tree?

Yes, but the common slang it is used for isn't the meaning we are using for l00tcode questions.
To be fair, Homebrew is great product design, but actually pretty janky software engineering. Anyone who's had it wreck their PATH a couple of times isn't going to be an automatic yes vote on a technical screen.
As if average FAANG quality in customer-facing software is better.

If that’s the hang-up on hiring him, they need to get the log out of their own eyes first, because shifting to the quality level of Homebrew would be a big improvement for a whole lot of their software.

Yes, we are aware companies hire privileged losers instead of skilled employees
Long ago, I switched to MacPorts because its path and directory story is better, and I didn't find myself having to run chown to fix things.
But inverting a binary tree is trivial. It’s not like finding the shortest path in a graph, or something similar that requires recalling an algorithm on the spot. Go and look at the actual problem if you don’t believe me.
It's amusing the answers so far are mostly all "well this is an easy question and he should have gotten it." I actually agree with that, but even so, he got rejected by Google but did get a job at Apple, which is what this article is about, and that seems like a far more relevant fact to me.
You sound like you're trying to make a point. Make a point.
I agree. Every hiring process will have false negatives. Pointing out every one doesn’t invalidate the effectiveness of the process
Effective for whom? And at doing what?

SV is full of mediocre engineers; so it fails at guaranteeing you got yourself a star. And I don't think anyone needs more anecdotes to think great candidates lose for arbitrary/subjective/misunderstanding/random reasons

--

I'm 15y into my career with a degree from CMU; I am treated like royalty everywhere I work ... and yet I still absolutely dread, hate and repeatedly have bad experiences interviewing for jobs.

I've considered switching careers numerous times because of the emotional distress I go through just interviewing. And that's before we even talk about the insane amount of time every prospective employer demands of you!

> insane amount of time every prospective employer demands of you

I have worked an average of 40-hour/week jobs for my entire 30-year career. What's this "demand" nonsense?

I believe parent is talking about time demands of the interview process, not the job.
ah!
Who's forcing you to stay in SV?

If it's making you so stressed out as you claim, then the obvious step, to me, would be a change of scenery.