https://github.com/jayantgoel001/greedy
Greedy Algorithms
https://github.com/jayantgoel001/greedy
greedy-algorithms
Last synced: 5 months ago
JSON representation
Greedy Algorithms
- Host: GitHub
- URL: https://github.com/jayantgoel001/greedy
- Owner: JayantGoel001
- Created: 2020-05-25T17:06:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-26T03:35:38.000Z (over 5 years ago)
- Last Synced: 2025-04-07T03:36:14.925Z (6 months ago)
- Topics: greedy-algorithms
- Language: C++
- Homepage: https://www.geeksforgeeks.org/greedy-algorithms/
- Size: 3.91 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.