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
[2895, 6187, 2131, '6377', 'y', '5363', '2225', 'u', 'G', '6427', '1593', '9871', 'A', '1351', '1387', 'V', 'K', '9889', '2387', 'T', '2853', '961', 'T', '37', '8385', '7729', '2983', '8227', '393', '2063', '7007', 'j', '6475', 'G', 3373, 6195, 9569, 's'], [2385, 'c', 'L', 5803, 'd', '6377', 'y', '5363', '2225', 'u', 'G', '6427', '1593', '9871', 'A', '1351', '1387', 'V', 'K', '9889', '2387', 'T', '2853', '961', 'T', '37', '8385', '7729', '2983', '8227', '393', '2063', '7007', 'j', '6475', 'J', 'R', 'v', 8519, 'd', 1531, 'U', 2221, 3391, 'n', 3865]
Answer:
6377, y, 5363, 2225, u, G, 6427, 1593, 9871, A, 1351, 1387, V, K, 9889, 2387, T, 2853, 961, T, 37, 8385, 7729, 2983, 8227, 393, 2063, 7007, j, 6475