Skip to content

Commit 5e5e7a9

Browse files
author
Taras Nikulin
committed
Description
1 parent 3755036 commit 5e5e7a9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Dijkstra Algorithm/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ After this step graph has this state:
6363
| Path Length From Start | 0 | inf | inf | inf | inf |
6464
| Path Vertices From Start | [A] | [ ] | [ ] | [ ] | [ ] |
6565

66-
> Step 1
66+
## Step 1
6767

6868
Then we check all of its neighbors.
6969
If checking vertex path length from start + edge weigth is smaller than neighbor's path length from start, then we set neighbor's path length from start new value and append to its pathVerticesFromStart array new vertex: checkingVertex. Repeat this action for every vertex.
@@ -88,7 +88,7 @@ And its state is here:
8888
| Path Length From Start | 0 | 3 | inf | 1 | inf |
8989
| Path Vertices From Start | [A] | [A, B] | [ ] | [A, D] | [ ] |
9090

91-
> Step 2
91+
## Step 2
9292

9393
From now we repeat all actions again and fill our table with new info!
9494

@@ -100,7 +100,7 @@ From now we repeat all actions again and fill our table with new info!
100100
| Path Length From Start | 0 | 3 | inf | 1 | 2 |
101101
| Path Vertices From Start | [A] | [A, B] | [ ] | [A, D] | [A, D, E] |
102102

103-
> Step 3
103+
## Step 3
104104

105105
<img src="Images/image5.png" height="250" />
106106

@@ -110,7 +110,7 @@ From now we repeat all actions again and fill our table with new info!
110110
| Path Length From Start | 0 | 3 | 11 | 1 | 2 |
111111
| Path Vertices From Start | [A] | [A, B] |[A, D, E, C]| [A, D] | [A, D, E ] |
112112

113-
> Step 4
113+
## Step 4
114114

115115
<img src="Images/image6.png" height="250" />
116116

@@ -120,23 +120,23 @@ From now we repeat all actions again and fill our table with new info!
120120
| Path Length From Start | 0 | 3 | 8 | 1 | 2 |
121121
| Path Vertices From Start | [A] | [A, B] | [A, B, C]| [A, D] | [A, D, E ] |
122122

123-
> Step 5
123+
## Step 5
124124

125125
<img src="Images/image7.png" height="250" />
126126

127-
> Step 6
128-
129127
| | A | B | C | D | E |
130128
|:------------------------- |:----------:|:----------:|:----------:|:----------:|:----------:|
131129
| Visited | T | T | T | T | T |
132130
| Path Length From Start | 0 | 3 | 8 | 1 | 2 |
133131
| Path Vertices From Start | [A] | [A, B] | [A, B, C]| [A, D] | [A, D, E ] |
134132

133+
## About
134+
135135
This repository contains to playgrounds:
136136
* To understand how does this algorithm works, I have created **VisualizedDijkstra.playground.** It works in auto and interactive modes. Moreover there are play/pause/stop buttons.
137137
* If you need only realization of the algorithm without visualization then run **Dijkstra.playground.** It contains necessary classes and couple functions to create random graph for algorithm testing.
138138

139-
## Dijkstra's algorithm explanation
139+
140140

141141

142142

0 commit comments

Comments
 (0)