Write a pseudocode to check if a given string S[1..n] is palindrome. A string ispalindrome if reading it from left to right is the same as reading it from right to left,e.g. "aba", "ddabadd", "abba".