ComputingData Structures & Algorithms

Data Structures Cheat Sheet — 1-page PDF

Exam cheat sheet: asymptotic analysis, core DS, graph/shortest-path algs, sorting, DP, recursion. The whole course on one dense, printable page for your midterm or final, with every formula typeset and worked examples where they help.

The first part is free below. See pricing →

For a specific exam: Data Structures & Algorithms Final exam study sheet.

  • 1 pageUS Letter
  • 10 sections11 topics
  • Free previewfull sheet with Unlimited
Preview of the one-page Data Structures & Algorithms cheat sheet: Exam cheat sheet: asymptotic analysis, core DS, graph/shortest-path algs, sorting, DP, recursion Cheat sheet locked
the whole course, one page

On the sheet

What’s on it

The topics a typical Data Structures & Algorithms exam tests, all on the one page.

  • Big-O analysis
  • Arrays and linked lists
  • Stacks and queues
  • Hash tables
  • Binary search trees
  • Heaps and priority queues
  • Graphs: BFS, DFS
  • Dijkstra and shortest paths
  • Sorting algorithms comparison
  • Dynamic programming patterns
  • Recursion and master theorem

Free preview

The free part, as text

The free part of the sheet, section by section. Unlock the full sheet to read the rest, edit any block, and print it or save it as a PDF.

01Complexity

Asymptotic upper bound
iff s.t. for all .
Lower / tight bound
iff eventually; iff both and .

Common growth

Asymptotic ordering.

Rules: drop constants; keep dominant term; nested loops multiply; sequential code adds then take max; if/else worst-case = max branch cost.

CaseMeaningUse
Bestminimum over inputsrare on exams unless asked
Averageexpected costneed distribution
Worstmax over inputsdefault unless stated
Amortizedavg over sequencedynamic arrays, union-find style analyses

02Lists

OperationSingly listDoubly list
Insert/delete at head
Insert/delete at tail unless tail ptr with tail ptr
Search
Delete given node to find prev if node known

Ex.Delete node after pointer in singly list?

Set ; time if known.

03Stack Queue Hash

Stack
LIFO; ops: , , .
Queue
FIFO; ops: , , front.
DSKey opsTypical impl
Stackpush/pop/toparray or list
Queueenqueue/dequeuecircular array or list
Dequepush/pop both endsdoubly linked list or circular array
Hash table
Map key slot via hash function ; average insert/search/delete under good hashing and bounded load factor.

04Heaps

Binary heap
Complete binary tree with heap-order: max-heap parent children; min-heap parent children.

Array indices

0-based array representation.

OperationBinary heap
peek min/max
insert
extract min/max
build-heap
Priority queue
Abstract ADT supporting insert and delete-extreme; commonly implemented with heap.

Watch out:Heap is not sorted; only root is extreme. In array heap, traversal order is not key order.

05Graphs

Graph
; directed or undirected; weighted edges may have costs.
BFS
Level-order traversal from source using queue; finds shortest path in unweighted graphs by #edges.

06Sorting

AlgBestAvgWorstStableIn-place
Bubble w/ early stopyesyes
Selectionnoyes
Insertionyesyes
Mergeyesno
Quicknoyes
Heapnoyes
Stable
Equal keys keep relative order.
In-place
Uses or extra space (course convention may vary).

Comparison sort lower bound: any comparison-based sort needs in the worst case.

Ex.Need stable, guaranteed ?

Merge sort.

Cheat sheet locked

Also on the full Data Structures & Algorithms sheet

8 more sections, with every definition, formula and worked example. Unlimited unlocks every full sheet in the library to edit, print or save as a PDF, and makes unlimited sheets from your own notes.

Complexity

  • Amortized

Arrays

  • Array
  • Dynamic array
  • Doubling

Lists

  • Singly linked list
  • Doubly linked list

Stack Queue Hash

  • Load factor

BST

  • Binary search tree
  • BST search

Graphs

  • DFS

Shortest Paths

  • Dijkstra
  • Relaxation
  • Shortest path tree

DP Recursion

  • Dynamic programming
  • Recursion
  • Master theorem

Unlock the full sheet $4.99 a month or $19 a semester

FAQ

Questions

About the Data Structures & Algorithms sheet and making your own.

What does this Data Structures & Algorithms cheat sheet cover?
It has 10 sections: Complexity, Arrays, Lists, Stack Queue Hash, BST, Heaps, Graphs, Shortest Paths, Sorting and DP Recursion. Together they cover the topics a typical Data Structures & Algorithms exam tests, including Big-O analysis, arrays and linked lists, stacks and queues and hash tables.
Is the data structures cheat sheet free?
The first part is free to read on this page, with no account needed. The full sheet opens in the app with Unlimited ($4.99 a month or $19 for a semester), where you can edit it, print it or save it as a PDF. It is one US Letter page and prints cleanly in black and white or colour.
Can I bring this Data Structures & Algorithms cheat sheet to my exam?
Only if your course allows a note sheet, so check the syllabus. This one is a single US Letter page. If your exam allows a different size, such as a 3x5 or 4x6 index card or one page front and back, Cheat Sheet AI makes one at exactly that size from your own lecture notes.
How accurate is it?
The sheet was written by our engine from a standard course outline, then a second model fact-checked every formula and statement against it; it corrected 6 statements before publishing. Notation and emphasis vary between courses, so check it against your own lecture notes.
Can I make a Data Structures & Algorithms sheet from my own notes?
Yes. Upload your lecture slides, notes or study guide and Cheat Sheet AI writes a sheet in your course's notation, sized to exactly the space your exam allows. Your first sheets are free.

Your course, your notes, one page.

Make this from your notes

Upload your own Data Structures & Algorithms slides or notes and get a study sheet in your course’s notation. Your first sheet needs no account, and a free account adds one more. See pricing