Pregunta de entrevista de Microsoft

Algorithm optimization from o(n^2) to o(n)