Skip to Content
Grokking Algorithms
book

Grokking Algorithms

by Aditya Bhargava
May 2016
Intermediate to advanced content levelIntermediate to advanced
256 pages
5h 53m
English
Manning Publications
Content preview from Grokking Algorithms

Chapter 7. Dijkstra’s algorithm

In this chapter

  • We continue the discussion of graphs, and you learn about weighted graphs: a way to assign more or less weight to some edges.
  • You learn Dijkstra’s algorithm, which lets you answer “What’s the shortest path to X?” for weighted graphs.
  • You learn about cycles in graphs, where Dijkstra’s algorithm doesn’t work.

In the last chapter, you figured out a way to get from point A to point B.

It’s not necessarily the fastest path. It’s the shortest path, because it has the least number of segments (three segments). ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Grokking Algorithms, Second Edition

Grokking Algorithms, Second Edition

Aditya Bhargava
Algorithms: 24-part Lecture Series

Algorithms: 24-part Lecture Series

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781617292231Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link