![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
zhangruixia0108
希望每天都有点小进步,每周一个稍大的进步,每月有个稍稍大的进步,每年有个大进步。
展开
-
leetcode Reverse String
class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str """ if s is None: return None if len(s) == 1:原创 2016-06-16 11:15:49 · 291 阅读 · 0 评论 -
LeetCode Add Digits
class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ if num == 0: return 0 return num - (num-1) / 9 * 9Ru原创 2016-06-21 11:14:26 · 198 阅读 · 0 评论 -
Leet Code Invert Binary Tree
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = Noneclass Solution(object): def原创 2016-06-21 13:36:32 · 163 阅读 · 0 评论 -
LeetCode Longest Common Prefix
class Solution(object): def longestCommonPrefix(self, s): """ :type s: str :rtype: str """ if len(s) == 0: return '' if len(s) == 1:原创 2016-07-03 14:58:22 · 196 阅读 · 0 评论