Skip to main content
Brian Sunter

Algorithms and Data Structures

My notes on algorithms and data structures, from Big O basics to heaps and sorting.

Cover image for Algorithms and Data Structures

A collection of notes on fundamental algorithms and data structures, covering time complexity analysis, sorting, searching, heaps, and more.

Foundations

Time Complexity

Understanding how to analyze algorithm efficiency.

Recurrence Relations (Subtracting Functions)

Analyzing algorithms where subproblems reduce by .

  • Divide and conquer introduction
  • Substitution method
  • Tree method
  • Master’s Theorem for

Recurrence Relations (Dividing Functions)

Analyzing algorithms where subproblems reduce by .

  • Substitution method
  • Tree method
  • Master’s Theorem for

Searching

Efficient searching in sorted arrays with time complexity.

  • Iterative implementation
  • Recursive implementation
  • Common variations and edge cases

Data Structures

Heap

A complete binary tree that satisfies the heap property.

  • Array representation of binary trees
  • Complete vs full binary trees
  • Min heap and max heap
  • Insertion and deletion
  • Heap sort
  • Heapify
  • Priority queues

Sorting

Merge Sort

A divide-and-conquer sorting algorithm with time complexity.

  • Two-way merge
  • K-way merge
  • Iterative merge sort

Quick Sort

An efficient in-place sorting algorithm with average time complexity.

More Resources

See also my Data Structures and Algorithms Guide for a comprehensive overview of topics and problems.