Augmented BST: Adding Custom Information to Nodes
Standard binary search trees give you O(log n) search, insert, and delete operations. But what if you need to answer ‘what’s the 5th smallest element?’ or ‘which intervals overlap with [3, 7]?’ These…
Read more →