Computer Science - Algorithms - Greedy algorithms - Greedy Coin Machine
Visual coin-change machine. Student sets a target amount (slider 1-99 cents). Available coins: 25¢, 10¢, 5¢, 1¢. The greedy approach: always pick the LARGEST coin that fits! For 67¢: take 25¢ (left: 42¢) → take 25¢ (left: 17¢) → take 10¢ (left: 7¢) → take 5¢ (left: 2¢) → take 1¢ → take 1¢. Total: 6