· 1 min read

Greedy Algorithm

Greedy algorithms are simple and intuitive. They make a series of choices, each of which is the best choice at the time, and they never look back. This post will help you understand the concept of greedy algorithms and how to solve problems using them.

Greedy algorithms are simple and intuitive. They make a series of choices, each of which is the best choice at the time, and they never look back. This post will help you understand the concept of greedy algorithms and how to solve problems using them.

What is Greedy Algorithm?

The CLRS books says:

Like dynamic-programming algorithms, greedy algorithms typically apply to optimization problems in which you make a set of choices in order to arrive at an optimal solution. The idea of a greedy algorithm is to make each choice in a locally optimal manner, resulting in a faster algorithm than you get with dynamic programming.

Back to Blog

Related Posts

View All Posts »

Dynamic Programming

Are you frustrated like me when you see a dynamic programming problem? This post will help you REALLY understand the concept of dynamic programming and how to solve problems using it.

Python tricks for Leetcode

If you use python for competitive programming, you might find these tricks useful. I have compiled a list of python tricks that can help you solve LeetCode problems faster.