摘要:
class Solution: def judgeCircle(self, moves: str) -> bool: location = [0, 0] for m in moves: if m == 'L': location[0] -= 1 elif m == 'R': ... 阅读全文
摘要:
class Solution(object): def sortArrayByParity(self, A): return [x for x in A if x % 2 == 0] + [x for x in A if x % 2 == 1] 阅读全文
摘要:
python列表切片有~这种简单表示. 阅读全文
摘要:
暴搜.. 阅读全文
摘要:
python二分插入,使用bisect(教程) 阅读全文
摘要:
class Solution(object): def sortedSquares(self, A): """ :type A: List[int] :rtype: List[int] """ return sorted([x * x for x in A]) 阅读全文