Editorial for JDCC '15 Contest 4 P1 - Palindromes
Submitting an official solution before solving the problem yourself is a bannable offence.
Check if each letter in the range , where is the size of the word, is equal to its corresponding letter (). If it isn't, then break the loop early and print
NAY otherwise print
YAY after searching the whole word.
Time Complexity: , where is the length of the word.