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
['C', 'F', 8875, 9185, 3971, 'q', 'n', 'I', '7919', '2115', 'x', '5987', 'u', 1455], ['p', 8603, 'n', 'I', '7919', '2115', 'x', '5987', 'R', 3859, 1871, 'q', 'O', 'u']
Answer:
n, I, 7919, 2115, x, 5987