Question d’entretien chez Nokia

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