Pregunta de entrevista de Google

Find longest subsequence of consecutive elements in an array.