Skip to main content

Greedy

This page provides links to solutions that use the Greedy approach.

Overview

The greedy approach is an algorithmic technique that makes the locally optimal choice at each step with the hope of finding a global optimum. It works by selecting the best option available at the moment without considering future consequences, aiming to reach the overall best solution.

How to Spot These Problems

You can identify greedy problems if the problem requires you to:

  • Find an optimal solution by choosing locally optimal solutions at each step.

Leetcode Problem Set