public static void main(String args[]) {
        int input[] = {1,3,4,3,2,1};
        CandiesProblem cp = new CandiesProblem();
        System.out.println(cp.minCandies(input));
    }
Date 2/7/16
@author Tushar Roy


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:
Each child must have at least one candy.
Children with a higher rating get more candies than their neighbors.
What is the minimum candies you must give?


Time complexity - O(n)
Space complexity - O(1)

Reference
https://leetcode.com/problems/candy/
src/com/interview/misc/CandiesProblem.java