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
[8479, 'Q', 483, 'F', 7157, 'X', 671, 8101, 'E', 2097, 7443, 'c', 1019, 6979, 1753, 2939, 'q', 907, 5779, 8211, 'k', 'h', 3747, 'D', '2495', '877', 'l', 'w', 'U', 'Q', '3701', 'J', '7803', '8053', '8951', '10007', 'P', '3111', 'T', '5829', 'u', '1553', '7453', '9177', 'U', 'P', 'k', 5755, 'A', 'h', 6815, 'Q', 5149, 4497], ['i', 8081, 3531, 'U', 'n', 'Y', 611, 6537, 3397, 743, 3285, 'J', 'a', 'B', 'D', '2495', '877', 'l', 'w', 'U', 'Q', '3701', 'J', '7803', '8053', '8951', '10007', 'P', '3111', 'T', '5829', 'u', '1553', '7453', '9177', 'U', 'P', 'P', 't', 'S', 6701, 'Y', 7673, 'K', 247, 'h', 2687, 'L', 6557]
Answer:
D, 2495, 877, l, w, U, Q, 3701, J, 7803, 8053, 8951, 10007, P, 3111, T, 5829, u, 1553, 7453, 9177, U, P