There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. Give the minimum number of candies such that: each child has at least 1 candy, and children with a higher rating than their neighbor get more candies.
Two-Pass Greedy
First pass satisfies left neighbors, second pass satisfies right neighbors.