I had forgotten that back in 2014 I created a sort algorithm visualiser that used this approach, I even created a video for it. The sketch shows 13 different sort algorithms which could be used with different size data sets and includes the infamous quicksort median of three killer data set. You might try the standard quicksort algorithm on a sorted data set - so slow the bubble sort is faster.
Anyway here is the video and if you want to download the sketch I can make it available but I understand if you want the challenge and satisfaction of doing it yourself. ![]()