Visualizing sorting algorithms in Jupyter notebooks.
I wrote his as part of a presentation for a group of high school students. At the core is a framework for writing sorting algorithms that makes the internal operations (comparisons, swaps, etc) observable. Various plots and animations can be built on top of that.
This facilitates an interactive presentation where the students discuss ideas for a sorting algorithm, the presenter translates them on the fly into code, and we use the visualizations to see the results and troubleshoot. This allows the group to collaboratively design a simple sorting algorithm such as a selection sort.