Ask HN: I failed FAANG interview because I didn't know Binary tree?

7 points by sberg08 ↗ HN
Role was for Frontend engineer. There were 6 interviews (1 hour each). First 5 interviews went well. In the last interview, SDM asked me to explain binary tree and how to demonstrate it with a solution. It costed me the interview.

18 comments

[ 3.1 ms ] story [ 52.5 ms ] thread
Sorry to hear. Binary trees and related concepts (binary search, for example) are super useful and relatively basic, so they can usually be found in any introduction to algorithm and data structures. If you want to try again, do some studying of that. It will definitely help your programming skills in general!

This, by the way, can easily be the kind of concept that you don't think you need until you learn about it, suddenly figuring out that you've been writing very inefficient code before.

It’s not a meaningless question though. A binary tree is a simple and very common data structure.

Data structures are important for advanced front development, you need to know which one to use for a given problem.

Of course it’s possible to learn them and not knowing about them at a given time is not a red flag to me, but I guess a large company has so many candidates that they don’t have to risk hiring someone that somehow doesn’t know about them.

asking what a binary tree is is one thing. asking to create the data structures and maybe find/insert operations is ok. but asking a really confusing question involving a binary tree designed to having a pissing contest about who is the smarter one is not.
What stack are they useful in? I’ve never used a binary tree in app development.
Any stack. It's nothing stack-specific. If you're specific to some programming stack and knowledge of the DB, framework or language is what you're employed for, fine. Knowing the fundamentals and more-advanced topics in data structures and algorithms makes you more valuable to an employer and your ability to be employed by a top-tier platform company rises substantially.
Didn't you learn about BST during your Computer Science undergrad?
yeah, my thought too. how is it possible to graduate a CS program without knowing what a binary tree is?
He never implied to have studied CS
Plenty of self taught developers applying for jobs.
Best to forget about that interview and focus on future ones. Frontend engineering doesn't mean you can ignore performance issues in your programs. Binary trees are a very useful data structure to know in general. Ordered collections in many languages' standard libraries are internally implemented as balanced binary trees. It's good to have at least a high level understanding of this data structure.
Unfortunately, even if you won't be using it during your actual work, data structures and algorithms is still part of the interview process.

If you don't feel like going on a crusade to change the whole interview system, get yourself "cracking the coding interview", learn the basic stuff: linked-lists, trees, hash-map, search, sort, big-o

Honestly there isn't that much you need to know.

and just bite the bullet.

You need to dedicate significant study into data structures and algorithms with lots of coding challenges (leetcode-esque) to pass these interviews. Even some world class programmers will fail the interviews, that's how they've been designed.

I think it's quite a reasonable expectation to achieve a high paying job. It's just a shame that it's not necessarily related to the day to day work, not will your prior work experience help much.

Just found a new google killer please and tell this story in the interviews.

(it’s sarcasm people, why downvoting?)

Yeah, that's rough, but you really should know what a binary tree is if you want to be a software engineer. It's probably a good idea to study data structures and algorithms a bit more.
Sad thing is you might have been the best candidate. Just didn't know the secret handshake.
Super unlikely for a FAANG, even interns will be up on this stuff. Especially interns, all the school learning is fresher for them.
I don't follow. I was saying he might have been the most suitable person for the job. Would knowing that have magically changed him or her?