Leetcode sum solving: Rotation of arrays.