Given two sequences of unique symbols, devise a method to identify the longest contiguous or non-contiguous subsequence of symbols common to both.
Explanation: The longest sequence common to both sequences is ACD.
Explanation: The longest sequence common to both sequences is YZAB.
Longest shared subsequence of two sequences
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak