422 Valid Word Square
Given a sequence of words, check whether it forms a valid word square.
A sequence of words forms a valid word square if thekthrow and column read the exact same string, where 0 ≤k< max(numRows, numColumns).
- 1.The number of words given is at least 1 and does not exceed 500.
- 2.Word length will be at least 1 and does not exceed 500.
- 3.Each word contains only lowercase English alphabet