![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
yinzhuochao
这个作者很懒,什么都没留下…
展开
-
Leetcode - 19. Remove Nth Node From End of List
题目里遇到关于python的类# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# self.next = None一次遍历和两次遍历两种方法,但是不是很熟悉类的用法,所以就把链表的增删遍历做了一遍。题目答案和...原创 2018-11-05 15:18:42 · 153 阅读 · 1 评论 -
Leetcode - 20.Valid Parentheses
利用栈class Solution: def isValid(self, s): """ :type s: str :rtype: bool """ left = ['(','{','[',] right = [')','}',']'] l = [] fo...原创 2018-11-05 16:05:48 · 128 阅读 · 0 评论