Part 1. Definition
In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Part 2. Example
[5797, 8817, '8297', 'b', 'U', 'b'], [5843, 8809, '8297', 'b', 'W', 'C']
Answer: 8297, b
Explanation: Here, '8297, b' is the longest common subsequence in both the input lists [5797, 8817, '8297', 'b', 'U', 'b'] and [5843, 8809, '8297', 'b', 'W', 'C'].
Part 3. Exercise
[4893, 3307, 'M', 'N', 223, 2591, 6201, 97, 7111, 'g', 4775, 'J', 'H', '275', 'f', '8841', '533', 'p', 'Z', '8833', 'w', 'M', 'R', '5173', 'N', 'C', 'f', 'q', '8917', '5749', '3667', 'S', 8293, 'q', 'h', 'l', 'u', 5123, 2777, 6295, 'e', 'M', 7409, 'A', 'l', 'K'], [6137, 'S', 'v', 'D', 'm', 4751, 't', 'J', 'H', '275', 'f', '8841', '533', 'p', 'Z', '8833', 'w', 'M', 'R', '5173', 'N', 'C', 'f', 'q', '8917', '5749', '3667', 'l', 9211, 9187, 2297, 7383, 'S', 'h', 'M', 5863, 'v', 569]
Answer:
J, H, 275, f, 8841, 533, p, Z, 8833, w, M, R, 5173, N, C, f, q, 8917, 5749, 3667