Amazon interview question

Circular array path; string/substring manipulation