陈文泰
陈文泰
全部文章
分类
题解(65)
归档
标签
去牛客网
登录
/
注册
White Wolf
Geralt
全部文章
(共65篇)
题解 | #在二叉树中找到两个节点的最近公共祖先#
注意o1和o2是int,最后返回的也是intpostOrder的作用: 如果o1和o2都在,返回root; 如果有一个在,返回那一个; 都不在,返回None # class TreeNode: # def __init__(self, x): # self.val = x...
2021-07-15
0
284
题解 | #LCS#
# # longest common substring # @param str1 string字符串 the string # @param str2 string字符串 th...
2021-07-14
0
320
题解 | #二叉树的之字形层序遍历#
# class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # # # @param root TreeN...
2021-07-14
0
229
题解 | #括号序列#
```# # # @param s string字符串 # @return bool布尔型 # import collections class Solution: def isValid(self , s ): # write code here bra...
2021-07-14
0
289
题解 | #链表中环的入口结点#
# -*- coding:utf-8 -*- # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def EntryN...
2021-07-14
0
218
题解 | #合并两个有序的数组#
# # # @param A int整型一维数组 # @param B int整型一维数组 # @return void # class Solution: def merge(self , A, m, B, n): # write code here ...
2021-07-14
0
302
题解 | #最长无重复子数组#
# class ListNode: # def __init__(self, x): # sel...
2021-07-14
0
289
题解 | #最长无重复子数组#
最长无重复子数组 # # # @param arr int整型一维数组 the array # @return int整型 # class Solution: def maxLength(self , arr ): # write code here n ...
2021-07-14
0
287
题解 | #子数组的最大累加和问题#
# # max sum of the subarray # @param arr int整型一维数组 the array # @return int整型 # class Solution: def maxsumofSubarray(self , arr ): # write ...
2021-07-14
0
258
题解 | #链表中的节点每k个一组翻转#
O(n), O(n/k) # class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # # @param head ListNode类 # @param ...
2021-07-14
0
287
首页
上一页
1
2
3
4
5
6
7
下一页
末页