IBM Interview Question

Check if prime or not? Rotate an array