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
['R', 'B', 'p', 'b', 3747, 'u', 975, 811, 'L', 3111, '1715', '8671', 'z', 'Y', 'h', '5843', '5619', '7821', 'A', 'E', '9617', '3001', '9085', 'W', '7049', '3517', '6259', 'D', '4211', '5289', 'v', '9471', '6333', '3361', '1975', '5371', 'W', 'E', 6233, 3273, 'M', 'q', 4759, 9419, 3857], ['y', 7717, 'e', 'D', 9501, 'W', 'F', 'c', 5681, 'Q', 'm', 2085, 5185, 5679, 8155, 6587, 2765, 'y', 8257, 9851, 8223, 'i', 'j', '1715', '8671', 'z', 'Y', 'h', '5843', '5619', '7821', 'A', 'E', '9617', '3001', '9085', 'W', '7049', '3517', '6259', 'D', '4211', '5289', 'v', '9471', '6333', '3361', '1975', '5371', 'Y', 635, 't', 'E', 1459, 's', 'w', 'g', 3765, 'c', 'R', 'u', 597, 'v', 'Y', 'b', 465, 'H', 7711, 'D', 's', 'w', 6543, 6469, 's']
Answer:
1715, 8671, z, Y, h, 5843, 5619, 7821, A, E, 9617, 3001, 9085, W, 7049, 3517, 6259, D, 4211, 5289, v, 9471, 6333, 3361, 1975, 5371