37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
|
# Palindrome
|
||
|
A palindrome is a word, phrase, number or sequence of words that reads the same backward as forward. Punctuation and spaces between the words or lettering is allowed.
|
||
|
|
||
|
## Steps
|
||
|
### Step 1
|
||
|
Reverse string.
|
||
|
### Step 2
|
||
|
Compare the reversed string to the original string, if they are equal this mean that string is palindrome.
|
||
|
|
||
|
## Example
|
||
|
|
||
|
### Single Word Palindromes
|
||
|
- Civic
|
||
|
- Level
|
||
|
- Madam
|
||
|
|
||
|
### Multiple Word Palindromes
|
||
|
- Don't nod.
|
||
|
- I did, did I?
|
||
|
- My gym
|
||
|
|
||
|
## Implementation
|
||
|
- [C](../../../algorithms/C/strings/palindrome.c)
|
||
|
- [C#](../../../algorithms/CSharp/src/Strings/palindrome.cs)
|
||
|
- [Haskell](../../../algorithms/Haskell/strings/palindrome.hs)
|
||
|
- [Java](../../../algorithms/Java/strings/palindrome.java)
|
||
|
- [JavaScript](../../../algorithms/JavaScript/src/strings/palindrome.js)
|
||
|
- [Python](../../../algorithms/Python/strings/palindrome.py)
|
||
|
- [Rust](../../../algorithms/Rust/strings/palindrome/src/main.rs)
|
||
|
|
||
|
## Video URL
|
||
|
[A coursera video explaining the palindrome Algorithm](https://www.coursera.org/lecture/program-code/palindrome-algorithm-1-zzQqs)
|
||
|
|
||
|
## Others
|
||
|
|
||
|
Any other information is always welcome and should be included in this section.
|