Data Structures & Algorithms · Core algorithms
Sorting & binary search
Why sorting costs O(n log n), how merge sort works, how to sort real data with key functions, and binary search: finding things in O(log n) once data is sorted.
Step 1 of 6 · Overview30 min read ·
Key idea
Prereqs: Big-O, Recursion. Next: Heaps & priority queues. MIT 6.006 Lectures 3 & 5.Next: 1. Sorting in practice