Topic: Greedy Algorithm Problem / Level: beginner

Problem: Distribute candies to children such that each child gets at least one candy, and the total number of candies distributed is minimized.

Run the code to see the output here...