+ 2
That said, you can skip the creation of an array with reversed strings, and use a similar logic to compare each character with the one in the mirrored position.
+ 2
Isuru what's your doubt?
+ 2
Isuru Pls improve your question by:
1. Removing the wall of code in the question description, saving it in Code Playground, then adding a link to it (use "+" button) in the question description again.
2. Stating your requests in the question description too, not in an answer, where it can get lost if there are many others.