Valid Palindrome Algorithm

It consists of a set of words write out in a square grid, such that the same words can be read both horizontally and vertically. A popular puzzle dating well into ancient times, the word square is sometimes compared to the magic square, though apart from the fact that both use square grids there is no real connection between the two.

Valid Palindrome source code, pseudocode and analysis