Added juggling algorithm for array rotation