Have you ever seen such a Dijksta algorithm to explain it? (Animation solution algorithm)

Inside the video using a pseudo-code , is to give the reader a variety of languages to understand, I will give concrete realization of the link.

The video "Dijkstra algorithm, single-source shortest path" for the original video bloggers, if you feel ok speak clear, a point of concern, tap the link swipe amount of play, making easy, thank you.

BTree- two trees: Dijkstra algorithm
URL: https: //www.bilibili.com/video/BV1k741117pp

1. code implementation

To save space, open-minded.
Link: various Dijkstra algorithm to achieve

2. Dijkstra algorithm description and analysis

2.1 Dijkstra algorithm what it is

Here Insert Picture Description
Here Typing less a K, but not a big problem.
In fact, he is an improved version of breadth-first search, but the difference between ordinary and breadth-first search is that he is not messing around, not moving blind child node, but a choice, choose the shortest move.

The figure below normal breadth-first search, is not clear if the reader master the breadth-first search, I can see this article:
breadth / breadth-first search in the end is what the hell (the solution algorithm attached various versions of the animation code that implements) at: https://blog.csdn.net/qq_45877524/article/details/104845320
Here Insert Picture Description
this is Dijkstra's algorithm:
Here Insert Picture Description

2.2 went to the hi (yi) smell (lian) music (meng) see (bi) performance analysis, as well as proof of links

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

3. The implementation process

Here Insert Picture Description

Step 3.1

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

3.2 implementation

Hong Kong really, animation does not smell?
Here Insert Picture Description

4. examples

Accordance with the truth, there should have examples, but Dijkstra algorithm is actually a breadth-first search a little change, which are used in all leetcode breadth-first search algorithm to solve problems, big deal to change a little

5. References

. CSDN bloggers Turing's cat " straightforward algorithm --Dijkstra explain " at: https: //blog.csdn.net/qq_39521554/article/details/79333690 depth_1-utm_source = distribute.pc_relevant_right.none-? task & utm_source = distribute.pc_relevant_right.none-task

CSDN blogger mengxiang000000 the " shortest path algorithm dijkstra Detailed: dijkstra (diagram) (Long ", URL:
https://blog.csdn.net/mengxiang000000/article/details/50421243?depth_1-utm_source=distribute.pc_relevant.none- task & utm_source = distribute.pc_relevant.none-task

Released eight original articles · won praise 22 · views 1784

Guess you like

Origin blog.csdn.net/qq_45877524/article/details/105042197