Pergunta de entrevista da empresa Adobe

Find the second smallest and second largest element of a given array