5 ms·
It's not really the point of the question. The LC interview is basically a standardized test to eliminate bias as much as possible. If you prepare, you should b
by nvarsj 4y ago
It's not really the point of the question. The LC interview is basically a standardized test to eliminate bias as much as possible. If you prepare, you should be able to solve it. "Invert a binary tree" is actually considered an easy problem to test your basic knowledge of how trees work and tree traversal.
- snozolli 4y agoa standardized test to eliminate bias as much as possible Uhhhh... It eliminates competent, skilled people who don't have the time to memorize the latest cargo cult trends in hiring. Look in the article for a glaring example. "Invert a binary tree" is actually considered an easy problem to test your basic knowledge of how trees work and tree traversal. So would simply printing out a tree, and at least that's something a person might actually do. Tree "inversion" doesn't even make any sense and at this point I'm convinced that the cargo cult is choosing it because it's the extent of their own understanding of trees and somehow sounds extra technical to them.
- sophonX 4y agoWhy do you want to memorize it ? What happened to thinking logically ? People just complain for everything - they want it to be easy, say it's unfair.
- jmd42 4y agoI think it's more that the "inversion" interview story became a bit of a hot topic, and so is something people tend to reference in these discussions. Not that it's a specific problem people think is great to ask in interviews. It also seems to neatly split people into camps who think "this is trivial, and totally reasonable to expect somebody to answer, even if it's a little contrived", vs those who think "this is not practical, and you'd only know the answer if you'd already practiced it, so it's not fair to ask". > It eliminates competent, skilled people who don't have the time to memorize the latest cargo cult trends in hiring But given that you already acknowledged that it's pretty trivial, why would memorization be necessary for a competant person?
- nvarsj 4y agoTo be clear, I didn't imply I was agreeing with it. Just saying what the justification for this kind of question is. I agree completely it eliminates a huge swathe of people, mostly experienced and older people. FAANG employees, ime, are biased towards childless / single people with privileged backgrounds. Tree inversion sounds weird when you hear it phrased like that, but in an interview it would be explained with an example (just swap the left and right children recursively).
- zerr 4y agoLC interview is biased towards people who are into LC/Olympiad/competitive programming or who have enough free time and willingness/desperation to grind LC.