Leetcode 3076. Shortest Uncommon Substring in an Array
For each string in an array, find the shortest substring that does not occur in any other string (choose the lexicographically smallest one among ties), or return an empty string if none exists. The core challenge is efficiently testing substring uniqueness across all strings — often solved with generalized suffix structures, tries, or rolling-hash enumeration given n ≤ 100 and each length ≤ 20.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
It was exactly this question in leetcode with input: vector<string> titles = {"The Phantom Menace", "Attack of the Clones", "Revenge of the Sith", "A New Hope", "The Empire Strikes Back", "The Return of the Jedi", "The Force Awakens", "The Last Jedi" }; Since I finished coding the solution in like 20-25 mins. I was asked very small variations like if we want fixed lengths of substring, lexicographically smallest. Thats it
Hello Interview Premium
Your account is free and you can post anonymously if you choose.