Pregunta de entrevista de Google

Write a function to find the longest increasing subsequence in an integer array, optimizing for time complexity better than O(n^2).