docs(strings): add palindrome explanation
parent
a095f062f6
commit
849fd9e37c
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
Data structure and Algorithm (DSA)
|
Data structure and Algorithm (DSA)
|
||||||
|
|
||||||
|
## Explanations
|
||||||
|
- [English](./docs/en)
|
||||||
|
|
||||||
## Contribution Guidelines
|
## Contribution Guidelines
|
||||||
|
|
||||||
### 1. Contribution Specifications
|
### 1. Contribution Specifications
|
||||||
|
|
|
@ -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.
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Algorithms
|
||||||
|
|
||||||
|
## Strings
|
||||||
|
- [Palindrome](./Strings/Palindrome.md)
|
||||||
|
|
||||||
|
## Others
|
||||||
|
[How to add an new algorithm documentation ?](./CONTRIBUTING.md)
|
|
@ -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.
|
Loading…
Reference in New Issue