Pergunta de entrevista da empresa FlightAware

Find the smallest value in an integer array without sorting it. Assume that there is no Array.min() method. Sample input: {0, 1, 2, -50, 100, 0}

Resposta da entrevista

Sigiloso

22 de jul. de 2016

A = input I = A[0] for x in A[1:]: If x < I: I = x print I