An interesting subsequence
For two given sequences of integers, find the longest possible integer sequence which is a subsequence of both these sequences, and whose elements are integers in a (strictly) increasing order. Input The first number is n (1 ≤ n ≤ 5000), the length of the first sequence. The next n integers are elements of the first sequence. The next is m (1 ≤ m ≤ 5000), the length of the second sequence. Th
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start