Goldman Sachs Interview Question

Explain Longest subsequence with example