Pergunta de entrevista da empresa Intel Corporation

Find the maximum integer in an unsorted array of integers.

Resposta da entrevista

Sigiloso

3 de jun. de 2020

Solution 1: sort the array and retrieve the last element in the array. Solution 2: Assign the first element to be the maximum, linear scan the array and assign a new maximum as long as it greater than the current maximum.