Show Menu
Cheatography

Data Structures and Algorithms Cheat Sheet (DRAFT) by

McGill COMP 251

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Hashing

Hashing

Red-Black Trees

 

Elementary Graph Algorithms

 

Bipartite Graphs

 

Path Compre­ssion

find (i) {
   if p[i] = i 
      return i 
   else 
      p[i] = find(p[i])
      return p[i]
Disjoint Sets: all nodes that are parents of the argument gets assigned the same root node as their parent (repre­sen­tative element) including the argument itself.
 

Heaps & Heapsort

 

Disjoint Sets

Minimum Spanning Tree

 

Network Flows 1

 
 

BST & AVLT

 

Greedy Algorithms

 

Single Source Shortest Path

 

Network Flows 2