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
['U', 6727, 'K', 'S', 'o', 'L', 'b', 2757, 8387, 'n', 7377, 'F', '3575', '4599', 'S', 'q', 'x', 'x', 'r', '5551', '7915', '6761', '2449', 'd', '8871', 'I', 'I', 'S', 'm', 'u', 'q', '5361', '9841', '4123', 'o', 's', '8529', 'i', 'y', 1915, 'r', 'p', 9681, 'H', 7147, 3705, 9377, 'O', 'x', 'a', 863, 3227, 3247, 'c', 4763, 6557, 6243, 8529], ['q', 6909, 'C', 7215, 'P', 7531, 2363, 'E', 'g', 3865, 'g', 'j', 'n', 'z', 5277, 'e', 9507, 'F', '3575', '4599', 'S', 'q', 'x', 'x', 'r', '5551', '7915', '6761', '2449', 'd', '8871', 'I', 'I', 'S', 'm', 'u', 'q', '5361', '9841', '4123', 'o', 's', '8529', 'm', 6153, 'E', 'W', 'O', 1079, 2513, 'a', 'X', 9879, 'A', 5949, 'i', 'c', 'J', 'B', 'j', 'M', 1753, 6693, 'I', 1121, 6313, 3773, 'f']
Answer:
F, 3575, 4599, S, q, x, x, r, 5551, 7915, 6761, 2449, d, 8871, I, I, S, m, u, q, 5361, 9841, 4123, o, s, 8529