
leetcode
luoyushan333
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
20. Valid Parentheses
Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. The brackets must close in the correct order, “()” and “()[]{}” are all valid but原创 2017-09-11 17:12:40 · 233 阅读 · 0 评论 -
9. Palindrome Number
题目:Determine whether an integer is a palindrome. Do this without extra space.思路:开始想通过整数除法和取余数运算依次比较首尾是否相同,后来发现中间有0时很难比较。比如3005003 然后发现了一个神奇的东西,切片 666 一行代码搞定 如果我们把python里面的list比作一大块猪肉,那么list里面每一个元素,原创 2017-09-12 14:03:50 · 193 阅读 · 0 评论