...

/

Solution: Verifying an Alien Dictionary

Solution: Verifying an Alien Dictionary

Let's solve the Verifying an Alien Dictionary problem using the Topological Sort pattern.

Statement

You’re given a list of words with lowercase English letters in a different order, written in an alien language. The order of the alphabet is some permutation of lowercase letters of the English language.

We have to return TRUE if the given list of words is sorted lexicographically in this alien language.

Constraints:

  • 11 \leq words.length 100\leq 100
  • 11 \leq words[i].length 20\leq 20
...
Access this course and 1400+ top-rated courses and projects.