Pergunta de entrevista da empresa Nokia

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