A hard question similar to 'Min Rewards'. 'peaks and valley' technique is not working properly in this coding challenge, because it contains the same values next to each other. Traverse left-to-right and right-to-right is a better option.

Read more »