Amazon Interview Question

Leet code question: rotate string