Walmart Global Tech interview question

Greedy algorithm problem, rotate an array by k places