Tech IndustryJan 26, 2022
GoogleUnion Find

Have you ever gotten a self-balancing tree question in an interview?

B-Tree, AVL, Red-black, any self balancing tree question TC: low 300's YoE: 1.5

Poll
128 Participants
Select only one answer
Twitter letsBeSre Jan 26, 2022

I did get one of these questions at Google, years and years ago. The interviewer was not happy that I chose to implement the solution in Haskell because it boils down to just listing the balancing conditions and writing a very simple pattern match to handle each one, and you can trivially rely on recursion with no performance issues. They tried to make me go back and do it imperatively to prove I “really understood it” - that was the day I realized tech interviews are just bullshit gatekeeping & hazing, have absolutely nothing whatsoever with assessing skill or fit for the job, just complete frat house initiation nonsense standardized across a whole industry and pretended to be OK.

Perficient gxyvc Jan 26, 2022

Wow that is indeed bullshit.

Capital Group Flo!Rida Jan 26, 2022

💯

Amazon radhk Jan 26, 2022

I was asked in Amazon interview. I honestly told him I studied it long time, and there are few cases to left-rotate, right-rotate, and I can give a shot. He smiled and gave me another question. Maybe he was just checking the patience.

Amazon radhk Jan 26, 2022

BTW It was a hire

New
NP≠P Jan 26, 2022

Excellent way to gauge whether someone would be an effective software engineer in the real world! /s

New
ynKc32 Jan 26, 2022

Freaking YellowPages guy asked me in an interview! I was desperate at the time because of my H1B status. Fuck him!

Meta yVBi15 Jan 26, 2022

Used to be a very common question many years ago. I have been asked ones around both AVL/red black and B trees a few times. It’s no dumber (nor less dumb) than leetcode bullshit of today. Coding interviews have been broken forever.