Find longest common subsequence length | TikTok Interview Question