Palindrome Solutions

Jul 21, 20202 mins read

Table of Contents

PALINDROMES means PALIN (Back again) and DROMES (Running) Single Character is palindromic string.

History

  1. Palindrome comes from ancient greek
  2. Sator Square is one of the famous piece which is two dimensional

Below is the basic coding solution written in javascript.

1
2function isPalindrome(S) {
3 let iteration = Math.round(S.length / 2);
4 let backward = S.length;
5 for (let forward = 0; forward < iteration; forward++) {
6 backward--;
7 if (S[forward].toLowerCase() !== S[backward].toLowerCase()) {
8 return "NO";
9 }
10 }
11 return "YES";
12}
13

Some Words

  1. Detartrated (Longest incidental palindrome)
  2. WOW
  3. KAYAK
  4. Symmys - (Annual awards)
  5. RADAR
  6. EVIL OLIVE
  7. TACO CAT
  8. HUH
  9. DO GEESE SEE GOD
  10. BORE ME ROB
  11. RISE SIR
  12. MADAM
  13. DIVE VID
  14. Tattarrattat (Sound of knocking at the door used by James Joyce in Ulysses, modernist novel)

Some Phrases

  1. Top spot
  2. Able was i ere I Saw Elba
  3. A man, A Plan, A Canal: Panama

Longest Palindromic Substring

xyxracecart