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
[7543, 3945, 'R', 617, 8791, 'G', 'j', 'r', '5381', '7355', '1843', 'L', '7993', '5879', 'c', 'i', '2861', 'a', '5363', '9981', '5187', '7741', '4233', '1493', '7801', 'U', 'q', '5903', '1007', 'v', '3027', '347', 'd', '1117', '627', 'I', '4645', 'F', 4855, 6815, 10005, 9031, 'L', 'v', 'F', 7087, 7065], [9657, 'Q', '5381', '7355', '1843', 'L', '7993', '5879', 'c', 'i', '2861', 'a', '5363', '9981', '5187', '7741', '4233', '1493', '7801', 'U', 'q', '5903', '1007', 'v', '3027', '347', 'd', '1117', '627', 'I', '4645', 'B', 'y', 'U', 2277, 7901, 2839, 'p', 3735, 'X', 'h', 4039, 'r', 8999, 'C', 'N', 5627, 9991, 2421, 6443, 7207, 'q', 2651, 4625, 'q', 'V', 793, 2101, 'x', 595]
Answer:
5381, 7355, 1843, L, 7993, 5879, c, i, 2861, a, 5363, 9981, 5187, 7741, 4233, 1493, 7801, U, q, 5903, 1007, v, 3027, 347, d, 1117, 627, I, 4645