AlgoDS/Algorithm

Greedy Algorithm

데먕 2020. 1. 22. 12:32

1. Overview

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. So the problems where choosing locally optimal also leads to a global solution is the best fit for Greedy.

  • Greedy Algorithm is an algorithmic paradigm that builds up a solution piece by pice
  • It always chooses the next piece that offers the most obvious and immediate benefit
  • Greedy fits perfectly for those solutions in which choosing a locally optimal also leads to a globally optimal solution (aka 'Greedy choice')

2. Common Greedy Algorithms

2.1 Insertion Sort

2.2 Select Sort

2.3 Topological Sort

2.4 Prims

2.5 Kruskal

3. Reference

https://www.geeksforgeeks.org/greedy-algorithms/