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
[1605, 'P', 'v', 5809, 'h', 'i', '3259', 't', '5755', '1277', '8349', '7123', '2087', '2471', 'c', 'M', 'O', '1647', 'k', 'I', 'M', 'P', 4103, 931, 4319, 4933, 2495, 'p', 6233, 8265, 3327, 'L'], [7589, 9119, 'v', 7147, 'a', 'b', 9313, 'C', 4709, 'I', 381, 1981, 2417, 8787, 9153, '3259', 't', '5755', '1277', '8349', '7123', '2087', '2471', 'c', 'M', 'O', '1647', 'k', 'I', 'M', 'Y', 8783, 9643, 3473, 'E', 7215, 3105, 9519, 9063]
Answer:
3259, t, 5755, 1277, 8349, 7123, 2087, 2471, c, M, O, 1647, k, I, M