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
[8071, 'g', 6749, 'N', 7571, 'G', 'C', '3475', '6203', 'q', 'U', '7683', 'z', '6439', '9407', '3331', 'e', 'W', '4055', '3057', '2235', '8087', 'n', 'Q', '8227', 'q', 5899, 8417, 3309, 'c', 8125, 6349, 9917, 8821, 'G', 1869], [8395, 'g', 8435, 'z', 'm', 3571, 's', 8493, 'n', 1237, 7687, 1959, 'G', 'C', '3475', '6203', 'q', 'U', '7683', 'z', '6439', '9407', '3331', 'e', 'W', '4055', '3057', '2235', '8087', 'n', 'Q', '8227', 'L', 'K', 'r', 'a', 'N', 2121, 6907, 8233, 8617]
Answer:
G, C, 3475, 6203, q, U, 7683, z, 6439, 9407, 3331, e, W, 4055, 3057, 2235, 8087, n, Q, 8227