摘要: 1 class Solution: 2 def __init__(self): 3 self.tag = True 4 5 def preOrder(self,root,target): 6 if root != None: 7 if root.left != None: 8 if root.lef 阅读全文
posted @ 2020-01-19 21:16 Sempron2800+ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def printVertically(self, s: str) -> 'List[str]': 3 words = s.split(' ') 4 matrix = [] 5 maxlen = 0 6 for w in words: 7 maxlen = m 阅读全文
posted @ 2020-01-19 20:53 Sempron2800+ 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def maximum69Number (self, num: int) -> int: 3 result = '' 4 str_num = str(num) 5 i = 0 6 while i < len(str_num): 7 if str_num[i] 阅读全文
posted @ 2020-01-19 20:34 Sempron2800+ 阅读(145) 评论(0) 推荐(0) 编辑