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', 7483, '8665', '5037', 'Z', 'P', '3715', '3389', 'p', 'G', 'K', '3067', 'K', 's', 'f', 'R', '7513', '3863', 'H', 'g', '993', '4083', '7571', '5323', 'P', '2935', '4667', 'r', 'n', 'L', 'V', 2019, 2727, 9021, 1639, 6779, 4743, 6937, 'U', 'L', 'X', 1589, 'F', 'X', 2141, 'z', 6799, 2215, 9757, 'I', 'z', 'H', 1797, 6927, 5989], ['B', 3967, 817, 'V', 'q', 'H', 1741, 'E', 'l', 8155, 'v', 'L', 'h', 'f', 'f', 3017, 'Y', 'H', 'L', 8957, 4475, 5397, '8665', '5037', 'Z', 'P', '3715', '3389', 'p', 'G', 'K', '3067', 'K', 's', 'f', 'R', '7513', '3863', 'H', 'g', '993', '4083', '7571', '5323', 'P', '2935', '4667', 'r', 'n', 'X', 'x', 'N', 3303, 's', 'q', 5881, 'L', 3243, 4935, 'o', 'g', 2137, 9349, 'y', 'o', 'V']
Answer:
8665, 5037, Z, P, 3715, 3389, p, G, K, 3067, K, s, f, R, 7513, 3863, H, g, 993, 4083, 7571, 5323, P, 2935, 4667, r, n