Skip to content

Latest commit

 

History

History

289-repeatedGroups

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

repeatedGroups

Interview question of the issue #289 of rendezvous with cassidoo.

The Question

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]]

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!