Check if a string is palindrome or not is one of most common question we encountered during our basic days.
Let's Solve this problem with a Naive but efficient approach in this case.
Pseudocode :
- i=0, j=n
- while i < j:
- check if i'th element is not equal to j'th
- then return False
- else i++,j--
- loop end
- return True