Compute longest common subsequence length | Roku Interview Question