19。删除链表倒数第N个节点
- 2020 年 10 月 18 日
- 筆記
class ListNode: def __init__(self, val=0, next=None): self.v …
Continue Readingclass ListNode: def __init__(self, val=0, next=None): self.v …
Continue Readingclass TreeNode: def __init__(self, x): self.val = x self.lef …
Continue Readingclass Solution: # 定义一个反转字符串的函数。 def str_rever(self,s): lengt …
Continue Readingclass TreeNode: def __init__(self, val=0, left=None, right=N …
Continue Reading# Definition for a binary tree node.class TreeNode: def __in …
Continue Readingfrom typing import List# 这道题看了大佬写的代码,经过自己的理解写出来了。# 从最外围的四周找有 …
Continue Readingfrom typing import Listclass Solution: # 第一种是我想的办法 def singl …
Continue Readingfrom typing import List# 用动态规划的写法来写题。# 每一天都有五种情况发生,#1,今天买入,2 …
Continue Readingfrom typing import Listclass Solution: def findSubstring(sel …
Continue Reading这道题和第118题是一样的,需要注意这道题目对行数的要求 # 定义一个列表,用来存放数据 …
Continue Reading