in Algorithms retagged by
2,933 views
1 vote
1 vote
what approch does the greedy method follows

a)Top down b)Bottom up

I heard the answer as Top down why it is? can any one explain me please
in Algorithms retagged by
by
2.9k views

1 Answer

5 votes
5 votes
What does a greedy man do? He always chooses the best available option at the moment. Similarly, greedy algorithm chooses the best available option at the moment and proceeds further and there is no comeback. So, it is a Top Down Approach as we start from the top of the problem and gradually reaches the bottom.

On the other hand bottom up approaches like backtracking explores a solution till the end as as soon as it finds that unfeasible backtracks and then proceeds on a different route. So, this can be considered finding the solution from the bottom.
by

Related questions