Given an array of unique strings words, return all valid word squares that can be constructed from words. You may return the result in any order.
A sequence of words forms a valid word square if the
Note: The same word may be used multiple times when constructing a word square.
Constraints:
words.length
words[i].length
All words[i] have the same length.
words[i] consists of only lowercase English letters.
All strings in words are unique.
Given an array of unique strings words, return all valid word squares that can be constructed from words. You may return the result in any order.
A sequence of words forms a valid word square if the
Note: The same word may be used multiple times when constructing a word square.
Constraints:
words.length
words[i].length
All words[i] have the same length.
words[i] consists of only lowercase English letters.
All strings in words are unique.