🌐
GitHub
github.com › ultimatecoder › python-time-complexity-cheat-sheet
GitHub - ultimatecoder/python-time-complexity-cheat-sheet: Runtime of core Python functions
Remembering complexity of each built-in function of Python is difficult for me and I am sure it will be difficult for you too. This is a collection of runtime and space complexity that I have calculated by observing the latest source code of CPython. You can use this as a cheat sheet.
Author   ultimatecoder
🌐
GitHub
github.com › jaimin-bariya › python-complexity-cheatsheet
GitHub - jaimin-bariya/python-complexity-cheatsheet: A concise and comprehensive cheat sheet covering time complexities of Python's built-in data structures like Lists, Dictionaries, Sets, Tuples, and Strings. This resource is designed to help developers write efficient and optimized Python code. · GitHub
A concise and comprehensive cheat sheet covering time complexities of Python's built-in data structures like Lists, Dictionaries, Sets, Tuples, and Strings. This resource is designed to help developers write efficient and optimized Python code.
Author   jaimin-bariya
🌐
Reddit
reddit.com › r/python › big o cheat sheet: the time complexities of operations python's data structures
r/Python on Reddit: Big O Cheat Sheet: the time complexities of operations Python's data structures
April 16, 2024 -

I made a cheat sheet of all common operations on Python's many data structures. This include both the built-in data structures and all common standard library data structures.

The time complexities of different data structures in Python

If you're unfamiliar with time complexity and Big O notation, be sure to read the first section and the last two sections. I also recommend Ned Batchelder's talk/article that explains this topic more deeply.

Useful Big-O Notation Cheatsheet Aug 3, 2019
r/learnprogramming
6y ago
Big-O Algorithm Complexity Cheat Sheet May 4, 2013
r/compsci
13y ago
Big O Algorithm Comparison Table (Simple) Oct 28, 2025
r/learnprogramming
8mo ago
More results from reddit.com
🌐
GeeksforGeeks
geeksforgeeks.org › python › complexity-cheat-sheet-for-python-operations
Complexity Cheat Sheet for Python Operations - GeeksforGeeks
July 12, 2025 - This cheat sheet is designed to help developers understand the average and worst-case complexities of common operations for these data structures that help them write optimized and efficient code in Python. Python's list is an ordered, mutable sequence, often implemented as a dynamic array. Below are the time complexities for common list operations:
🌐
GitHub
github.com › ultimatecoder › python-time-complexity-cheat-sheet › blob › master › README.md
python-time-complexity-cheat-sheet/README.md at master · ultimatecoder/python-time-complexity-cheat-sheet
Remembering complexity of each built-in function of Python is difficult for me and I am sure it will be difficult for you too. This is a collection of runtime and space complexity that I have calculated by observing the latest source code of CPython. You can use this as a cheat sheet.
Author   ultimatecoder
🌐
Codecademy
codecademy.com › learn › algorithmic-concepts-python › modules › algorithmic-complexity-python › cheatsheet
Algorithmic Concepts: Algorithmic Complexity Cheatsheet | Codecademy
We compute the big-Ω by counting how many iterations an algorithm will take in the best-case scenario based on an input of N. For example, a Bubble Sort algorithm has a running time of Ω(N) because in the best case scenario the list is already sorted, and the bubble sort will terminate after the first iteration. ... Learn about the computer science concepts of data structures and algorithms and build implementations of each from scratch in modern Python.
🌐
TutorialsPoint
tutorialspoint.com › complexity-cheat-sheet-for-python-operations
Complexity Cheat Sheet for Python Operations
August 7, 2023 - Lists are implemented as dynamic arrays in Python. Here's the time complexity cheat sheet for list operations ?
🌐
Scribd
scribd.com › document › 867393840 › Time-Complexity-Cheat-Sheet
Time Complexity Cheat Sheet | PDF
This document provides a cheat sheet for time complexities, detailing loop complexities, recursive functions, and common patterns. It includes examples such as O(n), O(n^2), and O(log n) ...
Find elsewhere
🌐
Python Morsels
pythonmorsels.com › time-complexities
Python Big O: the time complexities of different data structures in Python - Python Morsels
April 16, 2024 - This article is primarily meant to act as a Python time complexity cheat sheet for those who already understand what time complexity is and how the time complexity of an operation might affect your code.
🌐
DEV Community
dev.to › jaiminbariya › python-complexity-cheat-sheet-3plf
Python Complexity Cheat Sheet 🚀 - DEV Community
January 25, 2025 - I’m thrilled to share that I’ve created a comprehensive Python Complexity Cheat Sheet 🐍 for all the coders out there who want to write efficient and optimized Python code. This cheat sheet is designed to help you understand the average and worst-case complexities of operations across Python’s built-in data structures. ... Understanding the time complexity of operations is essential for writing scalable applications.
🌐
HackerEarth
hackerearth.com › practice › notes › big-o-cheatsheet-series-data-structures-and-algorithms-with-thier-complexities-1
Big o Cheatsheet - Data structures and Algorithms with thier complexities | HackerEarth
Big o Cheatsheet - Data structures and Algorithms with thier complexities · Time-complexity · Algorithms · Big-o · Big o cheatsheet with complexities chart · Big o complete Graph · Legend · Sorting Algorithms chart · Tweet · Author · Varun N R · Frontend Engineer at Wall app ·
🌐
GitHub
github.com › ultimatecoder › python-time-complexity-cheat-sheet › blob › master › source › cheatsheet.tex
python-time-complexity-cheat-sheet/source/cheatsheet.tex at master · ultimatecoder/python-time-complexity-cheat-sheet
\section*{Time complexity of built-in functions of Python} % Title · \end{minipage} } · %---------------------------------------------------------------------------------------- % FIRST COLUMN SPECIFICATION · %---------------------------------------------------------------------------------------- ·
Author   ultimatecoder
🌐
GitHub
github.com › ReaVNaiL › Big-O-Complexity-Cheat-Sheet
GitHub - ReaVNaiL/Big-O-Complexity-Cheat-Sheet: A comprehensive guide to understanding the time and space complexities of common algorithms and data structures. This repository provides a concise summary of the key concepts in algorithm analysis, presented in an easy-to-read cheat sheet format. · GitHub
A comprehensive guide to understanding the time and space complexities of common algorithms and data structures. This repository provides a concise summary of the key concepts in algorithm analysis, presented in an easy-to-read cheat sheet format.
Starred by 171 users
Forked by 18 users
🌐
freeCodeCamp
freecodecamp.org › news › big-o-cheat-sheet-time-complexity-chart
Big O Cheat Sheet – Time Complexity Chart
November 7, 2024 - We will be focusing on time complexity in this guide. This will be an in-depth cheatsheet to help you understand how to calculate the time complexity for any algorithm.
🌐
Hackr
hackr.io › home › articles › cheat sheets
Big O Notation Cheat Sheet | What Is Time & Space Complexity?
January 30, 2025 - Python with Dr. Johns ... Need some guidance? Try our AI Assistant! ... Need some guidance? Try our AI Assistant! ... By continuing, you agree to our Terms of Use and Privacy Policy. ... Programmers use Big O notation for analyzing the time and space complexities of an algorithm. This notation measures the upper bound performance of any algorithm. To know everything about this notation, keep reading this Big O Cheat Sheet.
🌐
Scribd
scribd.com › document › 330851737 › big-o-cheatsheet-pdf
Big-O Complexity Cheat Sheet | PDF
Python Time Complexity Overview · 2 pages · Data Structures Time Complexity Cheat Sheet · No ratings yet · Data Structures Time Complexity Cheat Sheet · 6 pages · Big-O Complexity Cheat Sheet · No ratings yet · Big-O Complexity Cheat Sheet · 3 pages · DSA Time & Space Complexities Guide ·
🌐
Souravsengupta
souravsengupta.com › cds2016 › lectures › Complexity_Cheatsheet.pdf pdf
Know Thy Complexities! www.bigocheatsheet.com Big-O Complexity Chart Excellent
Know Thy Complexities · www.bigocheatsheet.com · Big-O Complexity Chart · Excellent · Horrible · O(1), O(log n) · O(n log n) · O(n^2) · O(2^n) · O(n!)
🌐
Cheat Sheets
cheat-sheets.org › saved-copy › bigoposter.pdf pdf
Data Structure Time Complexity Space Complexity Average Worst Worst Access
Time Complexity · Space Complexity · Average · Worst · Worst · Access · Search · Insertion · Deletion · Access · Search · Insertion · Deletion · Array · O(1) O(n) O(n) O(n) O(1) O(n) O(n) O(n) O(n) Stack · O(n) O(n) O(1) O(1) O(n) O(n) O(1) O(1) O(n) Singly-Linked List ·
🌐
Python
wiki.python.org › moin › TimeComplexity
TimeComplexity - Python Wiki
This page documents the time-complexity (aka "Big O" or "Big Oh") of various operations in current CPython. Other Python implementations (or older or still-under development versions of CPython) may have slightly different performance characteristics.