Sollicitatievraag bij Western Union

sort the array and how would you find the 3rd minimum element in the array containing duplicates.