Leetcode 943. Find the Shortest Superstring
Given up to 12 unique words, produce the shortest string that contains each word as a substring by choosing an ordering that maximizes pairwise overlaps—an NP-hard superstring problem that, with n ≤ 12, reduces to a TSP-like optimization solvable via bitmask DP over overlaps.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.