CPP solution for hackerrank problem Chocolate Game


Laurel and Hardy have n piles of chocolates with each pile containing some number of chocolates. The piles are arranged from left to right in a non decreasing order based on the number of chocolates in each pile. They play the following game......

More details on hackerrank