Question d’entretien chez SquareBoat

Write code to find the largest element and second largest element in the given array.