Array
135. Candy
Every child gets at least one candy, and any child rated higher than a neighbour must get more than that neighbour — minimise the total. The condition cuts both ways (left neighbour and right…
Loading…
Every child gets at least one candy, and any child rated higher than a neighbour must get more than that neighbour — minimise the total. The condition cuts both ways (left neighbour and right…
Loading…