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
[1527, 6311, 8927, 8605, 'v', '3541', 'b', '9641', '1093', '2649', 'H', '3821', '4251', 'K', 'L', 'J', '5301', '9463', 'z', '1403', 'O', 2283, 'g', 5991, 'B', 'n', 3997, 'G', 8425, 5409, 4395], ['P', 9991, 8325, 'b', 'u', 'v', '3541', 'b', '9641', '1093', '2649', 'H', '3821', '4251', 'K', 'L', 'J', '5301', '9463', 'z', '1403', 'J', 6627, 4667, 4387, 881, 8195, 'G']
Answer:
v, 3541, b, 9641, 1093, 2649, H, 3821, 4251, K, L, J, 5301, 9463, z, 1403