- 博客(3)
- 收藏
- 关注
转载 LeetCode--Reverse Integer
1 class Solution: 2 # @return an integer 3 def reverse(self, x): 4 if x < 0 : 5 a = str(x) 6 a = filter(str.isdigit,a) 7 a = ...
2014-03-23 18:01:00 50
转载 LeetCode--Reverse Words in a String
1 class Solution: 2 # @param s, a string 3 # @return a string 4 def reverseWords(self, s): 5 s = s.rstrip().lstrip() 6 d = s.split(' ') 7 e = d[...
2014-03-22 22:06:00 63
转载 LeetCode--Valid Palindrome
1 class Solution: 2 # @param s, a string 3 # @return a boolean 4 def isPalindrome(self, s): 5 d = filter(str.isalnum, s) 6 c = d[::-1] 7 if c.up...
2014-03-21 20:07:00 64
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人