Hopefully Izod will sign Doug to a golf shirt sponsorship deal soon. Fresh shirts in every video.
aaroncarvermail
Thanks Doug, this is by far the best explanation on insertion sort!
TimYear
Ended up here after seeing "insertion sort" mentioned in the average temperatures practice exercise's instructions. Wondering why this video is not included in the courses' page as the merge, selection and bubble sort are?
Just seeing this video (haven't tried figuring out how to code this yet) it seems the least intuitive of all 4, and as bad as selection sort. Is that why it got removed from the course?
ashkiin
This feels like bubble sort with extra steps
pramitgautam
Why wasn't this in the lecture though
markmarki
i love you thank you helped me in my computing lesson
thomasbeckley
Doug saving programmers' lives since 2017 :)
mahaagro
wasn't this guy in 21 Jump Street?
this_rishi
Could someone explain more about how he got O(n^2)?
tiakimx
Wouldn't it be quicker to create a new empty array and start building it up with the elements, instead of continuously shifting elements in the original array?
My only guess as to why this would be worst, is that it might make the program heavier in memory.
splodys
What week does this belong to? I can't find it on the CS50 website
TypicallyThomas
Why don't you include pseudocode? Great visualisation apart from that.
IMADETHISACCFORRAY
Had to double check my monitor because of the artifacts on his neck.
ValentinSharonov
When I try to sort an array of numbers, the way I calculate it, it every element only gets shifted (n - 1) times. For example for list of 4, 3, 2, 1: Wouldn't each element only shift 3 positions? So 4 elements * 3 shifts each = total of 12 shifts? so n * (n - 1) shifts?
But Doug says each of the n elements gets shifted n times. I don't understand how each element could shift n times? for example if 4 shifted 4 times wouldn't it go over the available number of indexes in the array?
arcadeeeee
Inmate shirt? Broadcasting from the prison?
bivshiyzek
What is the name of the CS50 course explaining all the sort algorithms?