Amazon Interview Question

Circular array path; string/substring manipulation