上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页
摘要: 这不是我写的,对于树的学习处于初始阶段。 class Solution(object): def inorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ white,gray=0,1 res=[] st 阅读全文
posted @ 2019-11-07 10:38 欣姐姐 阅读(158) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def removeKdigits(self, num, k): """ :type num: str :type k: int :rtype: str """ if k>=len(num): return '0' i=0 j=1 while k an 阅读全文
posted @ 2019-11-05 10:03 欣姐姐 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 这道题也不是我自己做出来的,只能说大佬牛逼!!! class Solution(object): def decodeString(self, s): """ :type s: str :rtype: str """ stack, res, multi = [], "", 0 for c in s: 阅读全文
posted @ 2019-11-04 18:04 欣姐姐 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 这道题也不是我自己想出来的。。。 执行用时 :32 ms, 在所有 python 提交中击败了62.20%的用户 内存消耗 :11.7 MB, 在所有 python 提交中击败了44.44%的用户 ——2019.11.4 阅读全文
posted @ 2019-11-04 16:58 欣姐姐 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 这个也不是我自己做出来的,感觉我还打不到这个水平,我好菜! class Solution: def maximalRectangle(self, matrix) -> int: if not matrix or not matrix[0]: return 0 row = len(matrix) co 阅读全文
posted @ 2019-11-04 15:23 欣姐姐 阅读(171) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def largestRectangleArea(self, heights): """ :type heights: List[int] :rtype: int """ stack = [] heights = [0] + heights + [0] 阅读全文
posted @ 2019-11-04 11:23 欣姐姐 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 执行用时 :132 ms, 在所有 python 提交中击败了81.56%的用户 内存消耗 :12.2 MB, 在所有 python 提交中击败了37.93%的用户 ——2019.11.2 阅读全文
posted @ 2019-11-02 18:02 欣姐姐 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 执行用时 :16 ms, 在所有 python 提交中击败了93.78%的用户 内存消耗 :11.8 MB, 在所有 python 提交中击败了19.05%的用户 ——2019.11.2 阅读全文
posted @ 2019-11-02 17:21 欣姐姐 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 执行用时 :248 ms, 在所有 python 提交中击败了58.82%的用户 内存消耗 :13.6 MB, 在所有 python 提交中击败了34.65%的用户 ——2019.11.2 阅读全文
posted @ 2019-11-02 17:11 欣姐姐 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 执行用时 :76 ms, 在所有 python 提交中击败了36.29%的用户 内存消耗 :11.8 MB, 在所有 python 提交中击败了38.18%的用户 ——2019.11.2 阅读全文
posted @ 2019-11-02 16:32 欣姐姐 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页