Search⌘ K

DIY: Verifying an Alien Dictionary

Understand how to implement a function that checks if words in an alien language are sorted based on a unique alphabet order. This lesson teaches you to work with string vectors and custom lexicographic rules in Rust to solve intriguing interview-style problems.

Problem statement

In this coding exercise, you are given a list of words written in an alien language. Surprisingly, the aliens also use lowercase English letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters of the English language.

Given a vector of words written in the alien ...