A longest common increasing subsequence of A and B is a common increasing subsequence of the maximum length. A straightforward O(mn2)-time algorithm for this problem is to sort the shorter sequence, and then find a longest common subsequence among the two sequences and the sorted sequence.
LCIS
最新推荐文章于 2022-04-06 00:20:03 发布