A few good habits will help you avoid common off-by-one errors. Why do computer scientists like to count from zero rather than one?
This video introduces insertsort, one of the simplest and most natural sorting algorithms. In passing we introduce preconditions, postconditions, invariants, assertions and the philosophy of programming by contract.
If you like my content, give it a thumbs up, subscribe to the channel, hit the notification bell and leave your comments below. This will encourage me to produce more videos for the benefit of aspiring computer scientists.
Course web page:
https://www.cl.cam.ac.uk/teaching/current/Algorithms/
Course handout:
https://www.cl.cam.ac.uk/teaching/2021/Algorithms/2020-2021-stajano-algs-handout.pdf
My home page:
https://www.cl.cam.ac.uk/~fms27/
Add comment