Given an array of integers:
{ 4, 5, 4, 7, 3, 2, 1, 7 }
What does the array containing the cumulative counts look? Enter those eight elements separated by space. Remember that the cumulative count is defined as the sum of all the counts generated so far.
Note: Cumulative counts array indices starts from to of the input array, for non-negative elements.
The output format example:
0 0 0 1 1 1 2 2