stable: keys always remain in the same order after sorting equal values
Before:
key:0 1 2 3
[3][0][2][2]
After:
key:0 1 2 3
[0][2][2][3]
unstable: key order is not nescessarily preserved
Before:
key:0 1 2 3
[3][0][2][2]
After:
key:0 2 1 3
[0][2][2][3]
https://www.youtube.com/watch?v=JU767SDMDvA
https://www.youtube.com/watch?v=g-PGLbMth_g
- have 2 pointers, min and curr
- in each iteration, find the min and swap with the start of the unsorted array
interesting visualisation of sorting https://www.youtube.com/watch?v=pcJHkWwjNl4
jist: they are the same, just different perspective