Greedy algorithm
A greedy algorithm is a type of Algorithm that makes the locally optimal choice at each stage with the hope that these local choices will lead to a globally optimum solution. It is often used to solve Optimization problems and is a key concept in Computer Science. Greedy algorithms are simple to implement and can be very efficient, but they do not always produce the optimal solution. They are commonly used in problems such as the Coin changing problem and the Activity selection problem. The greedy algorithm is also related to other concepts in computer science, including Dynamic programming and Backtracking.