![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 202 阅读 · 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 · 154 阅读 · 0 评论