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
['W', 'C', 'd', 3133, 'J', 7223, 'w', 'l', 'Y', 43, 7285, 4609, 'B', 'm', 'K', 991, 'Q', 4225, 'l', 5827, '3605', 'z', '2769', 'c', 'R', 'r', 'Y', '4341', 'C', 'A', '4923', '3989', '6795', '5281', '5773', 'I', 'D', '1309', '8255', '1277', 'd', '8535', '2237', '989', 'e', 'M', 'T', 'm', 'F', 4281, 'm', 'U', 4707, 5289, 'I', 'k', 203, 2375], [3005, 'c', 2415, 'r', 'T', 6123, 5897, 'S', 6987, 'D', 4893, 'B', 2393, 'h', 1585, 4815, 1227, 'z', 'V', 'p', 4719, '3605', 'z', '2769', 'c', 'R', 'r', 'Y', '4341', 'C', 'A', '4923', '3989', '6795', '5281', '5773', 'I', 'D', '1309', '8255', '1277', 'd', '8535', '2237', '989', 'e', 'd', 5403, 6285, 187, 4057, 8809, 7479, 'L', 6559, 2317, 'B', 969, 7363, 'Q', 'J', 'A', 4639, 'M', 'u', 601, 9023, 1981]
Answer:
3605, z, 2769, c, R, r, Y, 4341, C, A, 4923, 3989, 6795, 5281, 5773, I, D, 1309, 8255, 1277, d, 8535, 2237, 989, e