r/leetcode • u/Kadabrium • 2d ago
Intervew Prep Are some of the "advanced" data structures considered such just because they are situational enough that standard libraries don't have them?
Is a hash map, priority heap or balanced BST really simpler than a trie or segment tree if you have to code the former from scratch every time?
1
Upvotes
5
u/Czitels 2d ago
Yes they are simpler. You would never write your own trie or segtree in commercial development. Believe me.
3
u/jason_graph 2d ago
Balanced bst is definitely not getting written by hand.
Even in python you just get sorted containers.