Post History
Challenge Given an array of numbers return the cumulative count of each item. This is the number of times an item has occurred so far. Examples [1,1,2,2,2,1,1,1,3,3] -> [1,2,1,2,3,3,4,5,1,2]...
Question
code-golf
#1: Initial revision
Cumulative Counts
## Challenge Given an array of numbers return the cumulative count of each item. This is the number of times an item has occurred so far. ## Examples ``` [1,1,2,2,2,1,1,1,3,3] -> [1,2,1,2,3,3,4,5,1,2] [3,7,5,4,9,2,3,2,6,6] -> [1,1,1,1,1,1,2,2,1,2] ``` Brownie points for beating my 7 byte APL answer.