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
['f', 'i', 6801, 1977, 10029, 9733, 9797, 'u', 4789, 't', 8395, 5649, 'Q', 2449, 'H', 5249, 'd', 2509, 5067, 6903, 7013, 't', 7135, 'G', 'C', 'U', 'm', 'h', 1191, 'P', 'w', 'i', '1769', '3187', 'e', '7259', '2523', '1163', 'k', '9283', 'X', '1591', 'r', '8247', 'Y', '1683', 'p', 'v', '1877', '1839', 'd', 'v', 'E', '2883', '9027', 'y', 'a', 'y', '8485', 'n', 'f', 8653, 3393, 605, 'V'], [9509, 9703, 'E', 'f', 7539, 2113, 'A', 'J', 'Q', 'E', 9153, 'd', 'C', 9547, 'g', 'P', 'w', 'i', '1769', '3187', 'e', '7259', '2523', '1163', 'k', '9283', 'X', '1591', 'r', '8247', 'Y', '1683', 'p', 'v', '1877', '1839', 'd', 'v', 'E', '2883', '9027', 'y', 'a', 'y', '8485', 'X', 'f', 'R', 1981, 2575, 3393, 'y', 'p', 6025, 1567, 'j', 2009, 8129, 8867, 'e', 735, 'M', 9033]
Answer:
P, w, i, 1769, 3187, e, 7259, 2523, 1163, k, 9283, X, 1591, r, 8247, Y, 1683, p, v, 1877, 1839, d, v, E, 2883, 9027, y, a, y, 8485