3 ms·
The algorithm is essentially just inserting the i + 1 th element into the sorted subarray from 0 to i, and it inserts in the correct place. I’ll be teaching thi
by dhruvdh 5y ago
The algorithm is essentially just inserting the i + 1 th element into the sorted subarray from 0 to i, and it inserts in the correct place. I’ll be teaching this next week or the one after, I’ll try to record a video and share if I remember. It’s harder to explain with just words.
- ColinWright 5y agoI'd be fascinated to see this ... if you can do that I'd be grateful ... thank you. (Copying from your sibling comment) > It’s a lot more work to massage bubble sort into the other sorting algorithms they need to learn without scraping the code and starting from scratch. An interesting observation. When I teach equivalent things I tend to present them separately and individually, so the students recognise that they are different in important ways, and then cross-connect them with transformations or other bridging techniques. Then they can see that they are different, but related. I'll think about your approach next time I do something like this. Meanwhile, if you would be willing to share a video of teaching this topic I'd be pleased to see it ... contact details are in my profile if you'd prefer direct contact, although I'm sure others would also be interested.
- dtjc 5y agoI'd like to watch that video as well.