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
[7421, 'Q', 2309, 'T', 5967, 5863, 5927, 3237, 'i', 2329, 9767, 3431, 'W', 3439, 8627, 7865, '4629', 'K', '7609', '7755', '7351', '2865', 'B', 'j', 'F', 'z', '1429', 'N', '3827', 'W', 'a', 'l', 'J', 'K', '2551', 'f', 'x', 7215, 8015, 'z', 811, 'R', 'M', 'H', 1847, 'n', 'W', 'W', 1697, 3077, 'q', 3419, 'q', 'w', 4793], [9891, 'x', 8089, 5971, 's', 6055, 1311, 'h', 'h', 571, 7161, 9625, 'I', 9515, 4675, 7165, 9021, 'u', 1709, 5501, '4629', 'K', '7609', '7755', '7351', '2865', 'B', 'j', 'F', 'z', '1429', 'N', '3827', 'W', 'a', 'l', 'J', 'K', '2551', 'f', 'q', 1605, 'S', 5463]
Answer:
4629, K, 7609, 7755, 7351, 2865, B, j, F, z, 1429, N, 3827, W, a, l, J, K, 2551, f