puzzles/repeated-groups/README.md
Zoé Cassiopée Gauthier 7e4f02547b Initial commit
2024-04-02 17:01:09 -04:00

531 B

Repeated groups

Puzzle from the rendezvous with cassidoo newsletter from February 27th, 2023.

Given a list of numbers, return all groups of repeating consecutive numbers.

Examples:

> repeatedGroups([1, 2, 2, 4, 5])
[[2, 2]]

> repeatedGroups([1, 1, 0, 0, 8, 4, 4, 4, 3, 2, 1, 9, 9])
[[1, 1], [0, 0], [4, 4, 4], [9, 9]]

Solution posted at https://strangeobject.space/@ooze/109937701330608625