I'm reviewing DSAs in my LC grind. What is your experience with AVL trees in interviewing? Have you had to explain their use case or implement them? TC: $195k 2.5 YOE
I was asked if I were comfortable explaining how they worked. Basically I said the general idea was rotations were done everytime the tree became unbalanced. I won't be able remember all the conditions and what would need to happen, but at worst, there would be a O(lgN) rotations done. That was more than good enough.
Thank you for sharing.
Most of us may not ever need to but I suspect it is used in database memtable as part of LSM tree. In memory sorted entries while records are written to WAL and then after reaching memory or time threshold, it is flushed up the disk I can talk through it and identify similar use cases but full disclosure..I've never had to implement it except for scoring grades in tests 😛
Yeah…that sounds like something that could show up at the L6 level, right? I have a long time before I’ll be there. Lol
I think it is overrated. Most of us never care if look under the covers and take these databases for granted Understanding databases book is pretty good from that regard Most of us are in the application domain so we build on tools smarter people provide for us.