摘要: 1 class Solution: 2 3 def insertIntoBST(self, root, val): 4 """ 5 Time: O(log(n)) [average case] 6 Space: O(1) 7 """ 8 new_node = TreeNode(val) ... 阅读全文
posted @ 2019-02-11 16:34 Sempron2800+ 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def brokenCalc(self, X: 'int', Y: 'int') -> 'int': 3 if X>=Y : 4 return Y-X 5 else: 6 num = 0 7 while Y > X: 8 ... 阅读全文
posted @ 2019-02-11 16:26 Sempron2800+ 阅读(165) 评论(0) 推荐(0) 编辑