A company is monitoring the number of cars in a parking lot each hour. Each hour they save the number of cars currently in the lot into an array of integers, numcars. The company would like to query numcars such that given a starting hour hj denoting the index in numcars, they know how many times the parking lot reached peak capacity by the end of the data collection. The peak capacity is defined as the maximum number of cars that parked in the lot from hj to the end of data collection, inclusively



Answer :

Other Questions