Pregunta de entrevista de Argusoft

Given an array of integers, write a function to find and return the largest and smallest elements in the array. Explain the time complexity of your solution.