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', 2841, 'D', 'd', 'N', 'i', 1115, 3737, 5433, 'c', 'w', 9641, 'k', 581, 7357, '6045', 'L', 'K', '6987', 'O', '2861', '499', '7731', 'r', 'P', 'f', '7659', 'l', '7133', 'I', 'V', 'l', 'P', 's', 'j', '3319', '8903', 'Y', 'd', 'J', 4179, 'y', 1669, 731, 8149, 'P'], ['Z', 7075, 'q', 'x', 'a', 5331, 'P', 'e', 5047, 5971, 4377, 4419, 'S', 1409, 8161, 1053, '6045', 'L', 'K', '6987', 'O', '2861', '499', '7731', 'r', 'P', 'f', '7659', 'l', '7133', 'I', 'V', 'l', 'P', 's', 'j', '3319', '8903', 'Y', 'D', 'j', 'o', 's', 9949, 2781, 'T', 6269, 2117, 2117, 2853, 'f']
Answer:
6045, L, K, 6987, O, 2861, 499, 7731, r, P, f, 7659, l, 7133, I, V, l, P, s, j, 3319, 8903, Y