MCPcopy Create free account

hub / github.com/JiayangWu/LeetCode-Python / functions

Functions2,012 in github.com/JiayangWu/LeetCode-Python

Methoddfs
(node, cur_sum)
LeetCode-Python/0129.求根节点到叶节点数字之和/0129-求根节点到叶节点数字之和.py:10
Methoddfs
(node, path)
LeetCode-Python/0257.二叉树的所有路径/0257-二叉树的所有路径.py:13
Methoddfs
(node, cur_binary)
LeetCode-Python/1022.从根到叶的二进制数之和/1022-从根到叶的二进制数之和.py:10
Methoddfs
(tmp, nums)
LeetCode-Python/0046.全排列/0046-全排列.py:8
Methoddfs
(node, cur_depth)
LeetCode-Python/0111.二叉树的最小深度/0111-二叉树的最小深度.py:13
Methoddfs
(left, right, tmp)
LeetCode-Python/剑指 Offer II 085.生成匹配的括号/剑指 Offer II 085-生成匹配的括号.py:4
Methoddfs
(node)
LeetCode-Python/0117.填充每个节点的下一个右侧节点指针II/0117-填充每个节点的下一个右侧节点指针II.py:29
Methoddfs
(node)
LeetCode-Python/1469.寻找所有的独生节点/1469-寻找所有的独生节点.py:11
Methoddfs
(node)
LeetCode-Python/LCP 67.装饰树/LCP 67-装饰树.py:10
Methoddfs
(left, right, tmp)
剑指 Offer II 085.生成匹配的括号/剑指 Offer II 085-生成匹配的括号.py:4
Methoddfs
(nums, tmp)
0017.电话号码的字母组合/0017-电话号码的字母组合.py:13
Methoddfs
(start, cnt, target, tmp)
0216.组合总和III/0216-组合总和III.py:9
Methoddfs
(node, tmp, parent_val)
0298.二叉树最长连续序列/0298-二叉树最长连续序列.py:20
Methoddfs
(node)
0366.寻找完全二叉树的叶子节点/0366-寻找完全二叉树的叶子节点.py:18
Methoddfs
(t, tmp)
0039.组合总和/0039-组合总和.py:10
Methoddfs
(node, siblings_cnt)
1469.寻找所有的独生节点/1469-寻找所有的独生节点 2.py:14
Methoddfs
(node, siblings_cnt)
1469.寻找所有的独生节点/1469-寻找所有的独生节点.py:14
Methoddfs
(node, path, s)
面试题34.二叉树中和为某一值的路径/面试题34-二叉树中和为某一值的路径.py:17
Methoddfs
(x0, y0)
0529.扫雷游戏/0529-扫雷游戏.py:22
Methoddfs
(start, tmp)
0051.N皇后/0051-N皇后.py:10
Methoddfs
(node)
0671.二叉树中第二小的节点/0671-二叉树中第二小的节点.py:16
Methoddfs
(x, y)
1020.飞地的数量/1020-飞地的数量.py:9
Methoddfs
(x, y)
0419.甲板上的战舰/0419-甲板上的战舰.py:15
Methoddfs
(node)
LCP 67.装饰树/LCP 67-装饰树.py:10
Methoddfs
(x0, y0)
0130.被围绕的区域/0130-被围绕的区域.py:16
Methoddfs
(start, tmp)
1255.得分最高的单词集合/1255-得分最高的单词集合.py:37
MethoddiStringMatch
:type S: str :rtype: List[int]
0942.增减字符串匹配/0942-增减字符串匹配.py:2
MethoddiagonalSort
:type mat: List[List[int]] :rtype: List[List[int]]
1329.将矩阵按对角线排序/1329-将矩阵按对角线排序.py:2
MethoddiameterOfBinaryTree
:type root: TreeNode :rtype: int
0543.二叉树的直径/0543-二叉树的直径.py:9
MethoddigitCount
(self, num: str)
LeetCode-Python/2283.判断一个数的数字计数是否等于数位的值/2283-判断一个数的数字计数是否等于数位的值.py:2
MethoddigitCount
(self, num: str)
2283.判断一个数的数字计数是否等于数位的值/2283-判断一个数的数字计数是否等于数位的值.py:2
MethoddisplayTable
(self, orders: List[List[str]])
LeetCode-Python/1418.点菜展示表/1418-点菜展示表.py:2
MethoddisplayTable
(self, orders: List[List[str]])
1418.点菜展示表/1418-点菜展示表.py:2
MethoddistinctAverages
(self, nums: List[int])
2465.不同的平均值数目/2465-不同的平均值数目.py:2
MethoddistinctAverages
(self, nums: List[int])
LeetCode-Python/2465.不同的平均值数目/2465-不同的平均值数目.py:2
MethoddistinctDifferenceArray
(self, nums: List[int])
LeetCode-Python/2670.找出不同元素数目差数组/2670-找出不同元素数目差数组.py:2
MethoddistinctDifferenceArray
(self, nums: List[int])
2670.找出不同元素数目差数组/2670-找出不同元素数目差数组.py:2
MethoddistributeCandies
:type candies: int :type num_people: int :rtype: List[int]
1103.分糖果II/1103-分糖果II 2.py:2
MethoddistributeCandies
:type candies: int :type num_people: int :rtype: List[int]
1103.分糖果II/1103-分糖果II.py:2
MethoddistributeCandies
:type candies: int :type num_people: int :rtype: List[int]
1104.分糖果II/1104-分糖果II.py:2
MethoddistributeCandies
(self, candies: int, num_people: int)
LeetCode-Python/1103.分糖果II/1103-分糖果II.py:2
MethoddistributeCandies
:type candies: List[int] :rtype: int
0575.分糖果/0575-分糖果.py:2
MethoddistributeCoins
:type root: TreeNode :rtype: int
0979.在二叉树中分配硬币/0979-在二叉树中分配硬币.py:9
Methoddivide
:type dividend: int :type divisor: int :rtype: int
0029.两数相除/0029-两数相除.py:2
MethoddivingBoard
:type shorter: int :type longer: int :type k: int :rtype: List[int]
面试题16.11.跳水板/面试题16.11-跳水板.py:2
MethoddivisorGame
:type N: int :rtype: bool
1025.除数博弈/1025-除数博弈.py:2
MethoddoesValidArrayExist
(self, derived: List[int])
2683.相邻值的按位异或/2683-相邻值的按位异或.py:2
MethoddoesValidArrayExist
(self, derived: List[int])
LeetCode-Python/2683.相邻值的按位异或/2683-相邻值的按位异或.py:2
MethoddominantIndex
:type nums: List[int] :rtype: int
0747.至少是其他数字两倍的最大数/0747-至少是其他数字两倍的最大数.py:2
MethodduplicateZeros
:type arr: List[int] :rtype: None Do not return anything, modify arr in-place instead.
1089.复写零/1089-复写零.py:2
Methodempty
Returns whether the queue is empty. :rtype: bool
0232.用栈实现队列/0232-用栈实现队列.py:42
Methodempty
Returns whether the stack is empty. :rtype: bool
0225.用队列实现栈/0225-用队列实现栈.py:36
MethodenQueue
Insert an element into the circular queue. Return true if the operation is successful. :type value: int :rtype: bool
0622.设计循环队列/0622-设计循环队列.py:13
Methodencode
Encodes a URL to a shortened URL. :type longUrl: str :rtype: str
0535.TinyURL的加密与解密/0535-TinyURL的加密与解密.py:3
Methodencode
Encodes a list of strings to a single string. :type strs: List[str] :rtype: str
0271.字符串的编码与解码/0271-字符串的编码与解码.py:3
MethodequalPairs
(self, grid: List[List[int]])
LeetCode-Python/2352.相等行列对/2352-相等行列对.py:2
MethodequalPairs
(self, grid: List[List[int]])
2352.相等行列对/2352-相等行列对.py:2
MethoderaseOverlapIntervals
:type intervals: List[List[int]] :rtype: int
0435.无重叠区间/0435-无重叠区间.py:2
MethodevalRPN
:type tokens: List[str] :rtype: int
0150.逆波兰表达式求值/0150-逆波兰表达式求值.py:2
MethodevalRPN
:type tokens: List[str] :rtype: int
0150.逆波兰表达式求值/0150-逆波兰表达式求值 2.py:2
MethodevalRPN
(self, tokens: List[str])
剑指 Offer II 036.后缀表达式/剑指 Offer II 036-后缀表达式.py:3
MethodevalRPN
(self, tokens: List[str])
LeetCode-Python/0150.逆波兰表达式求值/0150-逆波兰表达式求值.py:2
MethodevalRPN
(self, tokens: List[str])
LeetCode-Python/剑指 Offer II 036.后缀表达式/剑指 Offer II 036-后缀表达式.py:3
MethodevaluateTree
(self, root: Optional[TreeNode])
2331.计算布尔二叉树的值/2331-计算布尔二叉树的值.py:8
MethodevaluateTree
(self, root: Optional[TreeNode])
LeetCode-Python/2331.计算布尔二叉树的值/2331-计算布尔二叉树的值.py:8
MethodexecuteInstructions
(self, n: int, startPos: List[int], s: str)
2120.执行所有后缀指令/2120-执行所有后缀指令.py:2
MethodexecuteInstructions
(self, n: int, startPos: List[int], s: str)
LeetCode-Python/2120.执行所有后缀指令/2120-执行所有后缀指令.py:2
Methodexist
:type board: List[List[str]] :type word: str :rtype: bool
0079.单词搜索/0079-单词搜索.py:2
MethodexpandBinaryTree
(self, root: Optional[TreeNode])
LeetCode-Python/LCP 67.装饰树/LCP 67-装饰树.py:8
MethodexpandBinaryTree
(self, root: Optional[TreeNode])
LCP 67.装饰树/LCP 67-装饰树.py:8
MethodexpressiveWords
:type S: str :type words: List[str] :rtype: int
0809.情感丰富的文字/0809-情感丰富的文字.py:2
Methodfactor
(n)
1390.四因数/1390-四因数.py:7
MethodfairCandySwap
:type A: List[int] :type B: List[int] :rtype: List[int]
0888.公平的糖果交换/0888-公平的糖果交换.py:2
Methodfetch
(self, k: int)
LeetCode-Python/1756.设计最近使用(MRU)队列/1756-设计最近使用(MRU)队列.py:6
Methodfetch
(self, k: int)
1756.设计最近使用(MRU)队列/1756-设计最近使用(MRU)队列.py:6
Methodfib
:type N: int :rtype: int
0509.斐波那契数/0509-斐波那契数.py:2
MethodfillCups
(self, amount: List[int])
LeetCode-Python/2335.装满杯子需要的最短总时长/2335-装满杯子需要的最短总时长.py:3
MethodfillCups
(self, amount: List[int])
2335.装满杯子需要的最短总时长/2335-装满杯子需要的最短总时长.py:3
MethodfilterRestaurants
:type restaurants: List[List[int]] :type veganFriendly: int :type maxPrice: int :type maxDistance: int :rtype
1333.餐厅过滤器/1333-餐厅过滤器.py:2
MethodfinalPrices
(self, prices: List[int])
LeetCode-Python/1475.商品折扣后的最终价格/1475-商品折扣后的最终价格.py:2
MethodfinalPrices
:type prices: List[int] :rtype: List[int]
1475.商品折扣后的最终价格/1475-商品折扣后的最终价格 2.py:2
MethodfinalPrices
:type prices: List[int] :rtype: List[int]
1475.商品折扣后的最终价格/1475-商品折扣后的最终价格.py:2
MethodfinalValueAfterOperations
(self, operations: List[str])
2011.执行操作后的变量值/2011-执行操作后的变量值.py:2
MethodfinalValueAfterOperations
(self, operations: List[str])
LeetCode-Python/2011.执行操作后的变量值/2011-执行操作后的变量值.py:2
Methodfind
(self, target: int)
1261.在受污染的二叉树中查找元素/1261-在受污染的二叉树中查找元素.py:27
Methodfind
(self, target: int)
LeetCode-Python/1261.在受污染的二叉树中查找元素/1261-在受污染的二叉树中查找元素.py:27
MethodfindAnagrams
:type s: str :type p: str :rtype: List[int]
0438.找到字符串中所有字母异位词/0438-找到字符串中所有字母异位词.py:2
MethodfindBottomLeftValue
:type root: TreeNode :rtype: int
0513.找树左下角的值/0513-找树左下角的值.py:9
MethodfindBottomLeftValue
:type root: TreeNode :rtype: int
0513.找树左下角的值/0513-找树左下角的值 2.py:9
MethodfindBottomLeftValue
(self, root: Optional[TreeNode])
LeetCode-Python/0513.找树左下角的值/0513-找树左下角的值.py:8
MethodfindBottomLeftValue
(self, root: TreeNode)
LeetCode-Python/剑指 Offer II 045.二叉树最底层最左边的值/剑指 Offer II 045-二叉树最底层最左边的值.py:8
MethodfindBottomLeftValue
(self, root: TreeNode)
剑指 Offer II 045.二叉树最底层最左边的值/剑指 Offer II 045-二叉树最底层最左边的值.py:8
MethodfindBuildings
(self, heights: List[int])
LeetCode-Python/1762.能看到海景的建筑物/1762-能看到海景的建筑物.py:2
MethodfindBuildings
(self, heights: List[int])
1762.能看到海景的建筑物/1762-能看到海景的建筑物.py:2
MethodfindCelebrity
:type n: int :rtype: int
0277.搜寻名人/0277-搜寻名人.py:8
MethodfindCircleNum
:type M: List[List[int]] :rtype: int
0547.朋友圈/0547-朋友圈.py:2
MethodfindComplement
:type num: int :rtype: int
0476.数字的补数/0476-数字的补数.py:2
MethodfindContentChildren
0455.分发饼干/0455-分发饼干.cpp:5
MethodfindContinuousSequence
:type target: int :rtype: List[List[int]]
面试题57-II.和为s的连续正数序列/面试题57-II-和为s的连续正数序列.py:2
MethodfindCousin
(node, parent)
LeetCode-Python/0117.填充每个节点的下一个右侧节点指针II/0117-填充每个节点的下一个右侧节点指针II.py:16
← previousnext →601–700 of 2,012, ranked by callers