Mental Model
A Binary Search Tree (BST) keeps data sorted and allows ordered operations, while a Hash Map stores data for fast lookup but does not keep order.
Analogy: Think of a BST like a sorted bookshelf where you can find books in order and add new ones in the right place. A Hash Map is like a big box with labeled compartments for quick access but no order.
BST:
5
/ \
3 7
/ \
2 9
Hash Map:
[0]: null
[1]: null
[2]: 2
[3]: 3
[4]: null
[5]: 5
[6]: null
[7]: 7
[8]: null
[9]: 9
