Search
⌘K

Leetcode 3435. Frequencies of Shortest Supersequences

Given a set of 2-letter words (bigrams) over ≤16 distinct letters, each bigram imposes a precedence constraint (a must appear before b) and the task is to find all shortest strings that satisfy every constraint (cycles may force repeated letters) and return the unique letter-frequency vectors for those shortest common supersequences, ignoring sequences that are permutations of each other.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.