
leetcode
chang_sheng1
这个作者很懒,什么都没留下…
展开
-
Leetcode 682.棒球比赛
PYTHON实现 栈 class Solution: def calPoints(self, ops: List[str]) -> int: Stack=[] for op in ops: if op=="+": Stack.append(Stack[-1]+Stack[-2]) ...原创 2019-08-23 22:46:52 · 237 阅读 · 0 评论 -
Leetcode 2.两数相加
PYTHON实现 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def addTwoNumbers(self, l1: ListNode...原创 2019-08-21 22:11:23 · 87 阅读 · 0 评论