PayPal interview question

Psuedocode for finding the smallest and largest in an array