Logo

Craig 'n' Dave

Big O notation cheat sheet

A handy reference of the Big O notation for all the algorithms.

This cheat sheet illustrates the notation and description of time complexity with example code. Each is written in order of lowest to highest complexity and colour coded from O(1) green to O(2^n) red for easy reference.

The best, average and worst time complexity is shown for the linear search, binary search, hash table / dictionary search, depth and breadth first searches.

The best, average, worst time complexity and space complexity is shown for the bubble sort, insertion sort, merge sort and quick sort.




Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 01452 947500

Email: admin@craigndave.co.uk

Bett Awards Finalist 2024
TS Winner 2023
ERA Awards Finalist 2023
TS Finalist 2022
Bett Awards Finalist 2022