Verint Interview Question

Find the largest element in the given array, and asked to optimise it.