In my old programming days, we learned how to write a bubble sort before any other kind of sort. Simple, but inefficient, it’s still a good place to start when learning how to program sort algorithms.