Title says it all! Should I learn Heaps and Self Balancing Trees like Red Black or AVL implementations? In Java, I use PriorityQueue for problems on Heaps but should I know the implementation of the Heap Data Structure? Is it expected in an interview? Asking especially for Google Interviews and other similar tier companies! #Coding #interview #leetcode #tech #engineering #swe #software
You don’t need to know exactly but you should be able to explain why you chose one data structure over another
No. Of course not. Just know how to use priority queues with custom objects (just add a comparator).
They’re both easy enough you should know them just because you’re a developer out of interest
Self Balancing Trees are advanced material, even at universities those topics will be at the end.
You should understand the interface, the implementation doesn't really matter for interviews
Tbh I think you should at least know how to implement a heap at least in pseudo code. Just learn it once. It's literally like 10 lines of code that you can review in the future.
Yeah being asked to implement a heap in a 45 minute interview is reasonable. Definitely not red black trees though (or AVL)
Heap? Absolutely AVL + red black trees? No Source: did 5 onsites including FB G. Didn’t get any crazy tree questions
you should know at a high level how they work.