Loading exercise...

Exercise: Nearby Repeat

You’ve now used several ways to track values and move through a sequence. For these next two problems, choose your own approach before writing code. Start with a small example, then check what the input order and return value let you reuse. Write down the time and extra-space bounds you expect. Keep that explanation so you can compare it with your finished solution.

Become a Member to join the conversation.