Squarepoint Capital interview question

Standard DP: Longest common subsequence,