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
[3537, 7497, 'J', 1431, 'p', 'Y', '8139', '3', 'H', '2941', 'f', '2511', 'V', '4177', 'C', '6707', 'h', 'h', 'r', '9913', 'K', 'j', 'X', 'N', '4301', 'r', 'y', 'H', 'z', '591', 'e', '2719', '1497', '2735', '3203', 'J', 1781, 'f', 2885, 4103, 'g', 3497, 'v', 2535, 'z', 7079, 'F', 6251, 'j', 9587, 8417, 2413, 4063], [9841, 'p', 'r', 'd', 'Y', 'b', 'e', 6327, 'a', 'Y', 4371, 4523, 355, 'H', 4377, 'O', 3815, 1827, 9531, 'E', 1989, 'L', 'e', 5907, 9911, 6633, 'i', '8139', '3', 'H', '2941', 'f', '2511', 'V', '4177', 'C', '6707', 'h', 'h', 'r', '9913', 'K', 'j', 'X', 'N', '4301', 'r', 'y', 'H', 'z', '591', 'e', '2719', '1497', '2735', '3203', 's', 'C', 2459, 5635, 6713, 'N', 'c', 6153, 'P', 'I', 'C', 4853, 3675, 943, 4849, 9165, 'Z', 's']
Answer:
8139, 3, H, 2941, f, 2511, V, 4177, C, 6707, h, h, r, 9913, K, j, X, N, 4301, r, y, H, z, 591, e, 2719, 1497, 2735, 3203