Publicis Sapient interview question

rotate an array (basic leetcode question)