Leetcode 425. Word Squares
Given a list of equal-length words, find all n×n "word squares"—orderings of n words where the ith row equals the ith column for all i. The problem requires exploring permutations with heavy pruning via prefix queries (e.g., trie or hashmap by prefix) and backtracking to efficiently generate all valid squares.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.