Developer docs · Algorithms
Complexity analysis · Sorting · Searching · Basic data structures · Trees and heaps
Learn how an algorithm's running time and memory grow with input size using Big-O notation, and how to confirm the analysis by measuring.
6-chapter guideSorting algorithms put data in order: merge sort, quicksort, heapsort, stability, the n log n lower bound, counting and radix sort, and built-in sorts.
6-chapter guideSearching finds a value or position in data: linear search, binary search, lower_bound and upper_bound, binary search on the answer, and hash lookups.
6-chapter guideLearn how arrays, linked lists, stacks, queues and hash tables work, what each operation costs, and how to pick the right one.