Vijay Krishnavanshi
Open Source Developer at KDE
In general, Greedy is perceived as the one who thinks of instantaneous gains.
In computation,
Its the same but here its related to making decision which seem's more appropriate at any instant.
Whom do you call greedy?
Easiest Approach to come up with but have no proof of its correctness most of the times.
These are the easiest of all the approaches that are used in the solutions of the algorithmic problems.
Area of Application:
Using Greedy Approach:
( Try yourself )
Task: Reach form 0 to 4 with minimum overall path sum.
Seen a problem try to sorting the input.
May be you come up with a solution.
Sorting itself is greedy.
Any type of sorting you can take as an example.
Let's apply what we have just learnt.
Sample Input
4 100
30 40 40 50
Sample Output
YIPPIE
By Vijay Krishnavanshi