Pregunta de entrevista de Amazon

Some algorithm problems. Sorting, longest increasing numbers