Return true if a given sequence of words forms a valid word square (the k-th row and column are identical).
Given a list of words, determine if they form a valid word square. A valid word square means that the kth word (0-indexed) has the same sequence of characters as the kth column for all valid k.
Examples
Input:["abcd","bnrt","crmy","dtye"]
Output:true
Input:["abcd","bnrt","crm","dt"]
Output:true
Hints
Check that for each index i, words[i][j] equals words[j][i].
Only compare up to the minimum of row length and column length.
A valid square requires word[i].length == word.length for all i.