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
[5911, 'u', 6309, 9397, 9345, 7997, 'U', 'w', 'q', '7585', '3117', '4453', '3581', 'O', 'j', '3815', 'i', 'h', '1507', '3615', 'f', 'f', '2177', '3449', '1243', '5695', 'R', 'Z', 6167, 8919, 'M', 2389, 1105, 5255], ['d', 'F', 'w', 'q', '7585', '3117', '4453', '3581', 'O', 'j', '3815', 'i', 'h', '1507', '3615', 'f', 'f', '2177', '3449', '1243', '5695', 'e', 't', 8685, 'R', 'J', 5015, 8735, 'W', 5913]
Answer:
w, q, 7585, 3117, 4453, 3581, O, j, 3815, i, h, 1507, 3615, f, f, 2177, 3449, 1243, 5695