Rakuten interview question

rotate array , a typical leetcode question