# Alien Dictionary Topological Sort **Idea.** Build a graph from consecutive word pairs, then Kahn's algorithm yields the alien order or detects a cycle. **Interview tip.** Restate constraints, give brute force first, then optimize. Trace one example out loud before coding. *Disclosure: practice note shared by the Linkjob AI team.* For live mock-interview practice see [Linkjob AI](https://www.linkjob.ai/).