Interview question of the issue #315 of rendezvous with cassidoo.
Given a sequence of numbers, generate a "count and say" string.
Example:
> countAndSay(112222555)
> "two 1s, then four 2s, then three 5s"
> countAndSay(3333333333)
> "ten 3s"
Just pnpm i
to install all dependencies and then pnpm t
to run the tests!