4 ms·
This is the shortest common supersequence problem (https://en.wikipedia.org/wiki/Shortest_common_supersequence_problem https://en.wikipedia.org/wiki/Shortest_co
by rcheu 6y ago
This is the shortest common supersequence problem (https://en.wikipedia.org/wiki/Shortest_common_supersequence_problem https://en.wikipedia.org/wiki/Shortest_common_supersequence_...). It's NP-hard if you include repeating numbers; there's no simple changes to make your solution work in that case.
- tasuki 6y agoThank you, I felt this was important and just hand waved away in the article.