← Back to Difficulty Selection

Code Review (Easy): Describing Numeric Patterns

Story

Lena is working on a utility for ReviewThat Labs that generates a sequence of strings where each new entry describes the one before it. Each step involves looking at the previous string and recording the count and value of each group of identical digits. Mark reviewed her early draft and suggested making sure the tool could efficiently generate many versions of a sequence starting from just a single digit. For example, if the first entry is '1', the second becomes '11' to describe one 1, the third becomes '21' to describe two 1s, and the fourth results in '1211'.

Your Task

Read the story and code, then decide if the code is ready for production or needs improvement.

Hints

What would block an approval? Give me a hint.

Next

Check out Next Topic: The Basic Math Helper

Cookies help us track your progress - nothing extra.