Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
·
29 lines (21 loc) · 639 Bytes

File metadata and controls

executable file
·
29 lines (21 loc) · 639 Bytes

Palindrome Check

A Palindrome is a string that reads the same forwards and backwards. This means that the second half of the string is the reverse of the first half.

Examples

The following are palindromes (thus would return TRUE):

- "a"
- "pop"     ->  p + o + p
- "deed"    ->  de + ed
- "kayak"   ->  ka + y + ak
- "racecar" ->  rac + e + car

The following are NOT palindromes (thus would return FALSE):

- "rad"
- "dodo"
- "polo"

References