Pergunta de entrevista da empresa Rakuten

shift elements of a single dimensional array in the right direction by one position