What is Greedy Method
Before discussing the Fractional Knapsack, we talk a bit about the Greedy Algorithm. Here is our main question is when we can solve a problem with Greedy Method? Each problem has some common characteristic, as like the greedy method has too. Such as if a problem contains those following characteristic , then we can solve this problem using greedy algorithm. Such as
Look at the name of the method, Greedy Method. That is, we have to solve our problem in a straightforward way so that we can profit. That is, how much we can maximize or minimize when needed.The problem that is given is that there must be a solution.Because without solution, there can be no problem. This problem will have some constraints or limitations. That means we will be given a range beyond which we cannot work.
#algorithm #greedy #greedy method #knapsack #fractional