Nokia Interview Question

1. find second largest and smallest element in an array without using any inbuilt functions