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
[5597, 'u', 7509, 7493, 'c', 'L', 'n', 'o', 9617, 8561, 's', 'Y', 'n', '3597', '9889', 'M', '9987', 'i', 'k', 'P', '5807', 'q', '669', 'x', '1569', '2681', '4255', 'y', 'v', '7477', '5521', 'd', 'X', '5145', '6903', 'e', '2953', '2897', '2413', 'X', 4331, 'N', 7601, 6861, 'U', 7427, 'j', 'c', 5165, 2165, 'V', 2383], [6319, 6645, 1859, 417, 1435, 'e', 's', 10003, 'O', 'l', 3217, 6715, 'G', 4245, 6493, 'p', 'o', 4575, 9825, 'g', 1513, 6479, 3207, 7919, '3597', '9889', 'M', '9987', 'i', 'k', 'P', '5807', 'q', '669', 'x', '1569', '2681', '4255', 'y', 'v', '7477', '5521', 'd', 'X', '5145', '6903', 'e', '2953', '2897', '2413', 'T', 2105, 'g', 179, 'W', 'd', 3621, 2133, 4367, 9529, 5645, 'h', 'v', 6743, 'p', 4879, 435, 3573, 6921, 8143, 5887]
Answer:
3597, 9889, M, 9987, i, k, P, 5807, q, 669, x, 1569, 2681, 4255, y, v, 7477, 5521, d, X, 5145, 6903, e, 2953, 2897, 2413