algorithms(bf-to-astar): fix typos

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-01-02 09:20:43 +01:00
parent 39213f1536
commit 6a857d8ccd
Signed by: mfocko
GPG key ID: 7C47D46246790496
2 changed files with 4 additions and 3 deletions

View file

@ -283,7 +283,7 @@ y = i / width
## Bellman-Ford
If you have ever attended any Algorithms course that had path-finding in its
sylabus, you probably feel like you've seen the algorithm above before[^3]… And
syllabus, you probably feel like you've seen the algorithm above before[^3]… And
yes, the first algorithm I have proposed is a very dumb version of the
_Bellman-Ford_ algorithm, it's dumb, because it loops :wink: After our “looping”
prevention we got to the point that is almost the _Bellman-Ford_ with the one
@ -406,12 +406,12 @@ Let's have a short look at the time complexities of the presented algorithms:
2. our naïve approach with the fixed count of iterations instead of the
`do-while` loop results in the same worst-case time complexity:
$$
\mathcal{O}(\vert V \vert \cdot \vert E \vert)
\Theta(\vert V \vert \cdot \vert E \vert)
$$
3. and finally the well-known Bellman-Ford's algorithm time complexity:
$$
\mathcal{O}(\vert V \vert \cdot \vert E \vert)
\Theta(\vert V \vert \cdot \vert E \vert)
$$
## Small refactor

View file

@ -10,6 +10,7 @@ tags:
- bellman ford
- dynamic programming
- dijkstra
- greedy
- a star
last_update:
date: 2024-01-01