Pregunta de entrevista de Meta

Longest Increasing Subsequence, with different constraints