Minimum candies for children by rating (each child at least one, higher rating than neighbour gets more)
Asked in the PS/DS stage. Given an integer array ratings, return the minimum total number of candies required.
Implement minimum_candies(ratings). Each child must receive at least one candy. If a child has a higher rating than an immediate neighbor, that child must receive more candies than that neighbor. Return the minimum possible total as an integer.
def minimum_candies(ratings):