This lesson covers two foundational sorting algorithms: bubble sort and insertion sort.
- Big O Notation
- Introduction to Sorting
By the end of this module, learners will be able to:
- Describe the time and space complexities of bubble sort and insertion sort.
- Implement bubble sort and insertion sort.
There are two components to this module:
- Lesson: Basic Sorting Algorithms
- Exercise: Implementing Bubble & Insertion Sorts
- Exercise Solution: Bubble Sort
- Exercise Solution: Insertion Sort
Roughly 2.5 hours total:
- 0.5 hour - Basic Sorting Algorithms Lesson
- 2 hours - Implementing Bubble Sort and Implementing Insertion Sort Exercises
- Visualize bubble sort and insertion sort using this fun tool: An interactive tool for visualizing sorting algorithms.
- More visuals here: bubble sort, insertion sort: Video tutorials on bubble sort and insertion sort.
- Sample interview questions about bubble sort (Note: The code in this article is not JavaScript).
- Recap of how insertion sort works: An article explaining insertion sort.
- Last but certainly not least: Folk dancing for bubble sort and insertion sort: Fun videos demonstrating sorting algorithms through dance.
Find a 👾 bug 👾 or have suggestions? Let us know!
