题目描述
1 |
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. |
解题思路
- 使用low和high两个指针进行判断
- 如果遇到非alphanumeric字符,进行跳过处理
Go实现
1 |
package main |
Python实现
- 使用基本比较
1 |
class Solution(object): |
遇到的错误信息:
1 |
Runtime Error Message: |
- 使用库函数
1 |
|
近期评论