Back to problems

Alien Dictionary

Algorithm · Uber · Hard

Determine an Alien Alphabet Order A language uses the Latin letters, although its alphabet is arranged differently from the usual English sequence of "a", "b", "c" through "z". You are given a dictionary list of non-empty strings named words. Its entries are already arranged in lexicographical order according to that language's alphabet. Find a valid ordering of the letters used by the language. Return an empty string when the supplied ordering cannot be valid. When more…

Checking your access…