mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
docs(translate): add chinese translate for palidrome
This commit is contained in:
parent
cb7afe18ef
commit
51ce6219a3
28
src/algorithms/string/palindrome/README.zh-CN.md
Normal file
28
src/algorithms/string/palindrome/README.zh-CN.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# 回文检测
|
||||||
|
|
||||||
|
[回文](https://en.wikipedia.org/wiki/Palindrome) 是指正向和反向读起来相同的字符串。
|
||||||
|
回文字符串在表现上后半段刚好和前半段倒过来一样。
|
||||||
|
|
||||||
|
## 举例
|
||||||
|
|
||||||
|
以下是一些回文字符串的例子 (返回 `TRUE`):
|
||||||
|
|
||||||
|
```
|
||||||
|
- "a"
|
||||||
|
- "pop" -> p + o + p
|
||||||
|
- "deed" -> de + ed
|
||||||
|
- "kayak" -> ka + y + ak
|
||||||
|
- "racecar" -> rac + e + car
|
||||||
|
```
|
||||||
|
|
||||||
|
以下不是回文字符串 (返回 `FALSE`):
|
||||||
|
|
||||||
|
```
|
||||||
|
- "rad"
|
||||||
|
- "dodo"
|
||||||
|
- "polo"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 参考
|
||||||
|
|
||||||
|
- [GeeksForGeeks - Check if a number is Palindrome](https://www.geeksforgeeks.org/check-if-a-number-is-palindrome/)
|
Loading…
Reference in New Issue
Block a user