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 · 208 阅读 · 0 评论 -
Leetcode 2.两数相加
PYTHON实现# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# self.next = Noneclass Solution: def addTwoNumbers(self, l1: ListNode...原创 2019-08-21 22:11:23 · 76 阅读 · 0 评论