Understand how insertion sort works using an easy-to-follow visual animation.
See the algorithm running on an example.
Learn how to implement the insertion sort algorithm in the C language, using a step-by-step explanation.
See how to compute its worst case time complexity using a simple graphical argument.
0:01 Introduction
0:06 Analogy with playing cards
0:50 Overview of the insertion sort algorithm
1:29 Example of running insertion running on a particular array
2:51 How to implement insertion sort in the C language
4:06 How to compute the worst case time complexity
Subscribe to the Truly Understanding Algorithms channel for more explanations of interesting algorithms and data structures: https://www.youtube.com/channel/UCuRLSWJR0wegOS_VpfvTt2A.
Check out our other videos on sorting algorithms:
- Truly Understanding Mergesort: https://www.youtube.com/watch?v=HpPr0t8ieQ4
- Truly Understanding Quicksort: https://www.youtube.com/watch?v=jUTcsLD6RDQ
- Truly Understanding Bubble Sort: https://www.youtube.com/watch?v=JVilYn7kiIc
Visit us at trulyunderstandingalgorithms.com to read this tutorial and others in textual form.
If you enjoy these videos, you can support this channel financially on https://www.patreon.com/trulyunderstandingalgorithms.