Bloomberg Interview Question

One leetcode question was variation of count and say