摘要: class Solution: def diStringMatch(self, S: str) -> List[int]: A=[i for i in range(len(S)+1)] res = A for index,s in enumerate(S): if s is 'I': A[index 阅读全文
posted @ 2019-02-28 10:55 bluedream1000 阅读(129) 评论(0) 推荐(0) 编辑
摘要: class Solution: def judgeCircle(self, moves: str) -> bool: u,d,l,r = 0,0,0,0 for move in moves: if move is 'U': u += 1 elif move is 'D': d += 1 elif m 阅读全文
posted @ 2019-02-28 10:11 bluedream1000 阅读(140) 评论(0) 推荐(0) 编辑