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
['C', 2215, 7899, 'i', 'J', 4003, 5325, 'o', 'W', 2489, 'y', 'B', 6125, 'w', 9643, 853, 7761, 887, 5001, 7259, 7783, 'Z', 'C', 'f', 'J', '125', 'o', 'x', '7417', '4653', 'K', '4229', '4779', '2943', '4803', '5573', '7193', '3065', 'p', 'q', '3319', 'U', '3301', '5607', 'O', 'K', '3459', 'X', '3757', 't', 'D', 'I', 's', 'H', 'h', 7731, 'H', 'H', 571, 8113, 'i', 'V', 6361, 'R', 4027, 'O', 1535, 'E', 8385, 9277, 'x', 4407, 'H', 4271, 's', 4865, 'V'], [2343, 'G', 7473, 'A', 'T', 9811, 'Y', 5853, 'O', 4295, 'D', 2637, 7703, 6575, 9791, 649, 'i', 'F', 5123, 4723, 6149, 8039, 7187, '125', 'o', 'x', '7417', '4653', 'K', '4229', '4779', '2943', '4803', '5573', '7193', '3065', 'p', 'q', '3319', 'U', '3301', '5607', 'O', 'K', '3459', 'X', '3757', 't', 'D', 'Q', 'D', 'L', 'M', 'v']
Answer:
125, o, x, 7417, 4653, K, 4229, 4779, 2943, 4803, 5573, 7193, 3065, p, q, 3319, U, 3301, 5607, O, K, 3459, X, 3757, t, D