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
['j', 'n', 'i', '1193', 'z', 'U', 'V', 'o', 'm', '4003', '3001', 'f', 'S', 'n', '9727', 'C', 'z', '631', 'r', 'W', 'G', 'l', '3847', 'J', 'K', 'p', 'O', '3969', '1347', 'g', 3293], [7439, 367, 8587, 'm', 'T', 'I', 't', 't', 9321, 'd', 991, 967, 'n', 'S', 7381, 9249, 6589, 4345, 771, 'N', 2337, 'I', 'i', '1193', 'z', 'U', 'V', 'o', 'm', '4003', '3001', 'f', 'S', 'n', '9727', 'C', 'z', '631', 'r', 'W', 'G', 'l', '3847', 'J', 'K', 'p', 'O', '3969', '1347', 'r', 3989, 5803, 3513, 'z', 6335, 'e', 2303, 8233, 'P', 'X', 2559, 's', 'P', 9071, 9103, 'k', 'Z', 5733, 4591, 10001, 'K', 8207, 1367, 'V', 6665]
Answer:
i, 1193, z, U, V, o, m, 4003, 3001, f, S, n, 9727, C, z, 631, r, W, G, l, 3847, J, K, p, O, 3969, 1347