Infosys Interview Question

Implement an algorithm to find the maximum and minimum elements in an array. Write a program to rotate an array to the left by a given number of positions.