1
Unflatten groups of identical integers
Given an ascending-sorted array of possibly negative, possibly duplicated integers, your goal is to increment each integer within each group of identical numbers.
To demonstrate:
[1, 1, 1, 1, 10, 10, 20, 20, 20, 30, 40, 40, 40, 40]
should become this
[1, 2,...