🍬 Solving the "Candy" Problem from LeetCode: A Greedy Algorithm Approach
🚩 The Problem
Imagine a line of children, each with a performance rating. You’re tasked with distributing candies to them. But there’s a catch:
Every child must get at least one candy.
Children with a higher rating than their neighbours must get m...
haochengcodedev.hashnode.dev3 min read