Foundation Module

Sorting & Searching

Explore the classic algorithms that form the backbone of computer science: from simple comparisons to divide-and-conquer mastery.

10 hours
4 key concepts

Sorting Visualizer

Interactive

Bubble Sort

Repeatedly swaps adjacent elements if they are in wrong order

O(n²)
15
0
Comparisons
0
Swaps
0
Steps
Unsorted
Comparing
Pivot
Sorted

Algorithm Comparison

AlgorithmBest CaseAverage CaseWorst CaseSpaceStable
Bubble SortO(n)O(n²)O(n²)O(1)Yes
Selection SortO(n²)O(n²)O(n²)O(1)No
Insertion SortO(n)O(n²)O(n²)O(1)Yes
Merge SortO(n log n)O(n log n)O(n log n)O(n)Yes
Quick SortO(n log n)O(n log n)O(n²)O(log n)No

Chapters

1

Elementary Sorting

Simple but instructive sorting algorithms

Interactive
Bubble Sort O(n²)Selection Sort O(n²)Insertion Sort O(n²)
2

Divide & Conquer Sorting

Efficient O(n log n) sorting algorithms

Interactive
Merge Sort O(n log n)Quick Sort O(n log n)Heap Sort O(n log n)
3

Searching Algorithms

Finding elements efficiently

Interactive
Linear Search O(n)Binary Search O(log n)Search Variations O(log n)

Ready for graphs?

Explore graph traversal, shortest paths, and network algorithms.

© 2025 Algorithmica — Computer Science Learning Platform