Adobe interview question

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