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
[5365, 5963, 'i', 1423, 'P', 'S', 9571, 'D', 1443, 'Q', 1793, 8267, 'u', 'K', 'w', 'P', 'l', 1533, 'k', 'R', 'I', 'Z', 9225, 'k', 4319, 257, 'w', 7279, 'S', 6313, '8101', 'A', 'i', '4915', 'E', '8701', 'c', 'p', 'w', 'g', '2157', '4199', '1571', '3097', '8803', '1961', '2857', 'H', 'c', '8053', 'O', '17', 'c', 'i', 'I', 'I', '4235', '1325', '2685', 'd', 'F', 'd', 'W', 'L', 5479, 7965, 'A', 1031, 199, 9673, 8291, 'P', 5457, 3591, 'O', 2339, 8445, 'w', 7243], ['f', 7145, 9277, 'U', 3409, 615, 'E', 7193, 6057, 'Y', 3893, 'f', 'h', 'I', '8101', 'A', 'i', '4915', 'E', '8701', 'c', 'p', 'w', 'g', '2157', '4199', '1571', '3097', '8803', '1961', '2857', 'H', 'c', '8053', 'O', '17', 'c', 'i', 'I', 'I', '4235', '1325', '2685', 'd', 'P', 9763, 'v', 2065, 7663, 4387, 'G', 'M', 'r', 9671, 3781, 7871, 'D', 'k', 'P', 'u', 1671, 'Q']
Answer:
8101, A, i, 4915, E, 8701, c, p, w, g, 2157, 4199, 1571, 3097, 8803, 1961, 2857, H, c, 8053, O, 17, c, i, I, I, 4235, 1325, 2685, d