Verifying an Alien Dictionary
Try to solve the Verifying an Alien Dictionary problem.
We'll cover the following
Statement
You’re given an array 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 array of words is sorted lexicographically in this alien language.
Constraints:
-
words.length
-
words[i].length
order.length
- All the characters in
words[i]
andorder
are lowercase English letters.
Examples
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy