Examples

The following examples illustrate some problems that can be solved with this approach:

  1. Loading maximum containers in a cargo: For the given containers and the cargo having a capacity of 90kg90\\text{kg}90kg, fill the cargo with maximum containers without exceeding the capacity.
  2. Graph coloring: Color a graph so that no two adjacent vertices are colored using the same color and minimum colors are used.

Real-world problems

Many problems in the real world use the greedy techniques pattern. Let’s look at some examples.

Does your problem match this pattern?

Prims