Mental Model
Sorting can be done by comparing elements or by using their values directly without comparing.
Analogy: Imagine sorting books by comparing their titles one by one (comparison based) versus sorting mail by zip codes using pigeonholes (non comparison based).
Comparison Based Sorting: [5] -> [3] -> [8] -> [1] -> null Non Comparison Based Sorting: Buckets: [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] Values placed directly into buckets based on digits or keys.
