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
[4629, 3557, 'r', '7689', '2485', 'c', 'E', 'f', 'B', '869', '3707', 'B', '5201', '5425', 'f', 'z', '7169', 'S', 'v', 'n', '8329', 'y', 'c', 'E', 'k', 'x', '1203', 'r', 'R', 'S', 'g', 9857, 1719, 1113, 'o', 'T', 'w', 'X'], [4145, 't', 5601, 5191, 'F', 'r', 8965, 'p', 'p', 'F', 'p', 1327, 'r', '7689', '2485', 'c', 'E', 'f', 'B', '869', '3707', 'B', '5201', '5425', 'f', 'z', '7169', 'S', 'v', 'n', '8329', 'y', 'c', 'E', 'k', 'x', '1203', 'r', 'R', 'S', 'B', 9839, 6947, 1737, 5523, 'M', 4945, 'e', 4749, 5369, 'Q', 941, 9833, 'Z', 5567, 'M', 'E', 6511, 'j', 1245, 37, 'T', 5539]
Answer:
r, 7689, 2485, c, E, f, B, 869, 3707, B, 5201, 5425, f, z, 7169, S, v, n, 8329, y, c, E, k, x, 1203, r, R, S