Intel Corporation Interview Question

Find the maximum integer in an unsorted array of integers.

Interview Answer

Anonymous

Jun 3, 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.