Microsoft Interview (round 1) - Alien Dictionary
Anonymous User
24686

There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of words from the dictionary, where words are sorted lexicographically by the rules of this new language. Derive the order of letters in this language.

For example,
Given the following words in dictionary,

[
"wrt",
"wrf",
"er",
"ett",
"rftt"
]
The correct order is: "wertf".

https://leetcode.com/problems/alien-dictionary (premium)

Comments (25)