Appinventiv Interview Question

Program to find second largest and second minimum in an array