Question d’entretien chez MongoDB

Longest Common Subsequence optimised solution.