Skip to content

Commit 544de2e

Browse files
authored
moving to A\*
1 parent 4b2ff85 commit 544de2e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,27 @@ see code above
38003800

38013801
* study up on fancier algorithms, such as Dijkstra and A\*.
38023802

3803+
#### Dijkstra
3804+
is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks.
3805+
3806+
Dijkstra's algorithm to find the shortest path between a and b. It picks the unvisited vertex with the lowest distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor's distance if smaller. Mark visited (set to red) when done with neighbors.
3807+
Class Search algorithm
3808+
Data structure Graph
3809+
Worst-case performance O(|E|+|V|\log |V|)
3810+
3811+
![Dijkstra](/../master/images/dijkstra1.png?raw=true "Dijkstra ex")
3812+
![Dijkstra](/../master/images/dijkstra2.png?raw=true "Dijkstra ex")
3813+
![Dijkstra](/../master/images/dijkstra3.png?raw=true "Dijkstra ex")
3814+
![Dijkstra](/../master/images/dijkstra4.png?raw=true "Dijkstra ex")
3815+
![Dijkstra](/../master/images/dijkstra5.png?raw=true "Dijkstra ex")
3816+
![Dijkstra](/../master/images/dijkstra6.png?raw=true "Dijkstra ex")
3817+
![Dijkstra](/../master/images/dijkstra7.png?raw=true "Dijkstra ex")
3818+
![Dijkstra](/../master/images/dijkstra8.png?raw=true "Dijkstra ex")
3819+
![Dijkstra](/../master/images/dijkstra9.png?raw=true "Dijkstra ex")
3820+
![Dijkstra](/../master/images/dijkstra10.png?raw=true "Dijkstra ex")
3821+
![Dijkstra](/../master/images/dijkstra11.png?raw=true "Dijkstra ex")
3822+
3823+
#### A\*
38033824

38043825

38053826
## 10. Other data structures

0 commit comments

Comments
 (0)