Here is how it looks.
https://xosh.org/VisualizingSorts/sorting.html#IYZwngdgxgBAZ...
If you compare it with both Insertion and Bubble sort. You can see it looks more like insertion sort than bubble sort.
If you compare it with both Insertion and Bubble sort. You can see it looks more like insertion sort than bubble sort.
I think it is very possible to write this algorithm by mistake in intro compsci classes when you try to code a bubble sort by heart. I would think TAs may have many such instances in their students' homework.
This one is kind of special, though, since it's somehow more offensive to intuition than bubble sort itself.