Try this exercise. Fill in the missing part by typing it in.
Greedy algorithms are a class of algorithms that make ___ choices at each stage with the hope of finding a ___ optimum. Unlike dynamic programming, greedy algorithms do not always guarantee the optimal solution, but they are often ___ and ___ to implement.
One example of a problem that can be solved using a greedy algorithm is the ___ problem. In the knapsack problem, we are given a set of items, each with a weight and a value, and a knapsack with a certain weight capacity. The goal is to find the most ___ combination of items that can fit into the knapsack without exceeding its capacity.
Make sure to familiarize yourself with greedy algorithms and when they are suitable for solving problems! You will encounter many scenarios in which a greedy algorithm can be utilized to find an efficient ___.
Write the missing line below.