Deviopath › Go

Remove Consecutive Duplicates

Medium · Slices

Keep the first of each run of equal values: {1, 1, 2, 2, 2, 3} becomes {1, 2, 3}.

Write Compact(nums).

Next: Rotate Right