docs(strings): add palindrome explanation

pull/231/head
Ming Tsai 2021-04-18 17:18:04 -04:00
parent a095f062f6
commit 849fd9e37c
4 changed files with 75 additions and 0 deletions

View File

@ -2,6 +2,9 @@
Data structure and Algorithm (DSA)
## Explanations
- [English](./docs/en)
## Contribution Guidelines
### 1. Contribution Specifications

View File

@ -0,0 +1,29 @@
# Algorithm Name
Write a short description of algorithm like:
1. Time Complexity
2. Space Complexity
3. Applications
4. Founder's Name
5. etc...
## Steps
Describe the algorithm in clear, simple and understandable steps.
## Example
Trace the algorithm with a sample input data.
## Implementation
Links to their implementation in programming languages.
NOTE: The link should be within the other repos of this organization only.
## Video URL
Attach a URL of a video that explains the algorithm.
## Others
Any other information is always welcome and should be included in this section.

View File

@ -0,0 +1,7 @@
# Algorithms
## Strings
- [Palindrome](./Strings/Palindrome.md)
## Others
[How to add an new algorithm documentation ?](./CONTRIBUTING.md)

View File

@ -0,0 +1,36 @@
# 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.