Data Structure
Store A Store B School
Intersection
(Home,Store A)
(Store A,Home)
9Home, Store B)
Store A Store B School
(Home,Intersection)
(Store A, Store B)
Store B, School)
(Schoo, Store B)
(School,Intersection)
(Intersection,School)
Intersection
Home (49.2,-123.4) Home (Store A,Store B,Intesection)
Store A (Home,Store B)
Store A (49.3,-123.4)
Store B (School)
Store B (49.3,-123.3)
School (Store B, Intersection)
School (49.3,-123.2)
Intersection (School)
Intersection (49.2,-123.2)
Algorithms
Operations on different data structures and sets of
instructions for executing them.
Find all the places you can go from home
From each of those places, find all paths
Store A Store B School
Keep track of the distance you’ve
traveled as you go
Repeat this process until you get to
school
Compare the distance you’ve traveled
Find the shortest path
Intersection
(Home,Store A)
(Store A,Home)
9Home, Store B)
Store A Store B School
(Home,Intersection)
(Store A, Store B)
Store B, School)
(Schoo, Store B)
(School,Intersection)
(Intersection,School)
Intersection
Home (49.2,-123.4) Home (Store A,Store B,Intesection)
Store A (Home,Store B)
Store A (49.3,-123.4)
Store B (School)
Store B (49.3,-123.3)
School (Store B, Intersection)
School (49.3,-123.2)
Intersection (School)
Intersection (49.2,-123.2)