CRED Interview Question

Longest common increasing sequence problem