An open API service indexing awesome lists of open source software.

https://github.com/jayantgoel001/greedy

Greedy Algorithms
https://github.com/jayantgoel001/greedy

greedy-algorithms

Last synced: 5 months ago
JSON representation

Greedy Algorithms

Awesome Lists containing this project

README

          

# Greedy
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 global solution are best fit for Greedy.

For example consider the Fractional Knapsack Problem. The local optimal strategy is to choose the item that has maximum value vs weight ratio. This strategy also leads to global optimal solution because we allowed to take fractions of an item.