Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Written by Prashant Basnet
Prashant Basnet, a software engineer at Unisala.com, focuses on software development and enjoys building platforms to share knowledge. Interested in system design, data structures, and is currently learning NLP
Once upon a time, in a village of coders, there lived a gardener named Prashant. He had two ways of planting flowers in his garden Greedy and Non-Greedy.
1. The Non-Greedy Way
One day, Prashant wanted to count all the even-numbered flowers in his garden.
2. The Greedy Twist
Why was this greedy?
3. Another Greedy Trick
4. The Gas Station Puzzle
Moral of the Story
Greedy algorithms make quick, local decisions
— Prashant, the Algorithmic Gardener 🌸