FANDOM


A palindrome is a word or sentence that is the same when read backwards. In the case of sentences, spaces are ignored.

Detection of palindromes Edit

This is an algorithm to detect palindromic words represented as a string of characters, in pseudocode. (Indices are one-based)

Input: s, a word to be tested
Output: true if the word is palindromic
for i = 1 to len(s)/2
  if(character of s at i is not equal to character of s at len(s) - i + 1)
    return false
return true

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.