Candy Distribution - Two-Pass Greedy
Rule: Higher-rated kids must have more candies than neighbors
Two-Pass Greedy:
1. Left→Right: If rating[i] > rating[i-1], candy[i] = candy[i-1] + 1
2. Right→Left: If rating[i] > rating[i+1], candy[i] = max(candy[i], candy[i+1] + 1)
Time: O(n) | Space:
O(n)