← Questions
Alien dictionary: check sorted order, then infer the alphabet
0
I was asked this
No reports yet. Sign in to say where you were asked it.
- You are given the order of letters in an unfamiliar alphabet and a list of words. Return whether the words are sorted according to that alphabet.
- Now the alphabet is unknown: given a list of words already sorted in it, return one possible order of the letters, or report that none exists (the words contradict each other, or a word comes before its own prefix). State the time and space precisely.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
