This commit is contained in:
sparks345 2024-07-17 10:41:57 +09:00 committed by GitHub
commit 7e36cfde1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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/)