Greedy Algorithms
Learn about greedy algorithms and implement Dijkstra's algorithm in Python.
StartKey Concepts
Review core concepts you need to learn to master this subject
Greedy Algorithms
Greedy Algorithms
- A greedy algorithm solves an optimization problem by making the best decision at each step. This is known as the locally optimal decision.
- Greedy algorithms are simple and efficient but are NOT always correct.
- In order for a greedy algorithm to work, a problem must satisfy:
- The optimal substructure property
- The greedy property
Dijkstra's Algorithm: Conceptual
Lesson 1 of 2
- 1Now that we know how to properly search a graph, how can we use these skills in real life? One of the most common applications of graph searches is to find the shortest distance between vertices. …
- 2How efficient is Dijkstra’s algorithm? Let’s break it into different parts: - Searching through the graph - Keeping track of distances Just like breadth-first search and depth-first search, to se…
- 3Congratulations on grasping a conceptual understanding of Dijkstra’s Algorithm! Here’s a quick recap of what you’ve learned: - Dijkstra’s algorithm is an algorithm to find all of the shortest dis…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory