标签:
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
What is the minimum candies you must give?
参考资料:
http://siddontang.gitbooks.io/leetcode-solution/content/greedy/candy.html
https://leetcode.com/discuss/23835/one-pass-constant-space-java-solution
http://www.danielbit.com/blog/puzzle/leetcode/leetcode-candy
标签:
原文地址:http://www.cnblogs.com/grandyang/p/4575026.html