⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 20m 25s17 days 22 hours 20 minutes 25 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 20m 25s17 days 22 hours 20 minutes 25 seconds.

Sign in to watch this lesson
Algorithms - Graphs I · 3:52
Before you can search a graph you have to store it, and the layout decides both the memory and the speed. One six-vertex graph goes through an adjacency matrix (36 cells for 7 edges), adjacency lists (each undirected edge stored twice), an edge list and CSR (two flat arrays built by counting sort), with lists and CSR measured on a million vertices on this Mac. Then we meet graphs that are never stored at all: maze cells numbered r * W + c with neighbours from direction arrays, and state graphs whose vertices are (cell, keys) pairs.