Siemens interview question

Return the largest and the second largest element of the array