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
['G', 'G', 5937, 'x', 5717, 'h', 1477, 'y', 4305, 6439, 'U', 1621, 2155, 9773, 'E', 9757, 'c', 6493, 9551, 'H', 3861, 4157, 1375, 'K', 'l', 5797, 'g', 'M', 'I', 'i', 'n', 'i', 'I', 'K', '6847', 'U', '6541', '1065', 'd', '4723', 'W', 'e', 'f', 'T', '9377', '9099', 'C', '6409', 'd', '9109', '4647', '2959', 'R', '7751', 'p', 't', 'F', '5009', 'N', 'n', 'O', 'H', 3565, 4845, 7855, 2995, 5375, 'w', 'u', 2053, 4931, 2675, 'y', 'q', 8689, 8591, 's', 1987, 'F', 5257, 'G', 'Q', 'I'], ['P', 6283, 7393, 2567, 2369, 'H', 'r', 'D', 'Y', 'e', 'O', 5009, 'j', 9927, 'N', 9703, 'J', 3385, 4691, 5311, 'M', 'v', 'H', 'I', 5323, 'f', 4481, 'o', 'G', 2917, 'i', 'n', 'i', 'I', 'K', '6847', 'U', '6541', '1065', 'd', '4723', 'W', 'e', 'f', 'T', '9377', '9099', 'C', '6409', 'd', '9109', '4647', '2959', 'R', '7751', 'p', 't', 'F', '5009', 'N', 'F', 4137, 9177, 'z', 'H', 9137, 3457, 6931, 1493, 'G', 1651, 6653, 'E', 'p', 'J', 9901, 'S', 'l', 'R', 6819, 4379, 'K', 'N', 'x', 'A', 8475, 'M', 9369]
Answer:
i, n, i, I, K, 6847, U, 6541, 1065, d, 4723, W, e, f, T, 9377, 9099, C, 6409, d, 9109, 4647, 2959, R, 7751, p, t, F, 5009, N