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
['U', 'f', 1721, 'f', 2533, 'F', '4641', '3027', '6313', 'r', '9149', '2335', '6679', '3545', '6821', 'P', '2935', 'H', 'V', 2709, 'k', 'j', 6607, 'X', 8009, 3633, 'j', 1201, 'k', 7649, 'R'], [5395, 4969, 1031, 'H', 'u', 'D', 5497, 'J', 'Z', 4193, 5391, 145, 'F', '4641', '3027', '6313', 'r', '9149', '2335', '6679', '3545', '6821', 'P', '2935', 'H', 'O', 'D', 2439, 'D', 'g', 971, 7737]
Answer:
F, 4641, 3027, 6313, r, 9149, 2335, 6679, 3545, 6821, P, 2935, H