add implementation of rotateBy - a rotation of int array by n