LC: 422. Valid Word Square - spiralgo/algorithms GitHub Wiki

The Essence:

In a valid word square, a row with index i should have the same string with a cold with index i.

Details:

We can assume List<String> words as a matrix and iterate over the rows and cols in a nested for loops to compare values. The problem-solver can find a clean implementation here: https://github.com/spiralgo/algorithms/blob/master/src/main/java/algorithms/curated170/easy/ValidWordSquare.java

⚠️ **GitHub.com Fallback** ⚠️