Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JiayangWu/LeetCode-Python
/ functions
Functions
2,012 in github.com/JiayangWu/LeetCode-Python
⨍
Functions
2,012
◇
Types & classes
1,570
Method
__init__
Initialize your data structure here.
0225.用队列实现栈/0225-用队列实现栈.py:3
Method
__init__
Initialize your data structure here.
0208.实现Trie(前缀树)/0208-实现Trie(前缀树).py:3
Method
__init__
:type words: List[str]
0244.最短单词距离II/0244-最短单词距离II.py:3
Method
__init__
(self)
1352.最后K个数的乘积/1352-最后K个数的乘积.py:3
Method
__init__
(self, k: int, nums: List[int])
0703.数据流中的第K大元素/0703-数据流中的第K大元素.py:3
Method
__init__
(self, n)
1319.连通网络的操作次数/1319-连通网络的操作次数.py:3
Method
__init__
(self, root: TreeNode)
剑指 Offer II 055.二叉搜索树迭代器/剑指 Offer II 055-二叉搜索树迭代器.py:8
Method
__init__
(self, n: int)
1756.设计最近使用(MRU)队列/1756-设计最近使用(MRU)队列.py:3
Method
__init__
(self, n)
1168.水资源分配优化/1168-水资源分配优化.py:3
Method
__init__
:type nums: List[int]
0398.随机数索引/0398-随机数索引.py:3
Method
__init__
(self, val)
0315.计算右侧小于当前元素的个数/0315-计算右侧小于当前元素的个数.py:2
Method
__init__
initialize your data structure here.
面试题 03.02.栈的最小值/面试题 03.02-栈的最小值.py:3
Method
__init__
Initialize your data structure here.
0706.设计哈希映射/0706-设计哈希映射.py:3
Method
__init__
:type dictionary: List[str]
0288.单词的唯一缩写/0288-单词的唯一缩写.py:3
Method
__init__
Initialize your data structure here.
0211.添加与搜索单词-数据结构设计/0211-添加与搜索单词-数据结构设计.py:3
Method
add
(self, val: int)
0703.数据流中的第K大元素/0703-数据流中的第K大元素.py:12
Method
addBack
(self, num: int)
2336.无限集中的最小数字/2336-无限集中的最小数字.py:14
Method
addBack
(self, num: int)
LeetCode-Python/2336.无限集中的最小数字/2336-无限集中的最小数字.py:14
Method
addBinary
:type a: str :type b: str :rtype: str
0067.二进制求和/0067-二进制求和.py:2
Method
addCar
:type carType: int :rtype: bool
1603.设计停车系统/1603-设计停车系统.py:11
Method
addCar
:type carType: int :rtype: bool
1603.设计停车系统/1603-设计停车系统 2.py:11
Method
addCar
(self, carType: int)
LeetCode-Python/1603.设计停车系统/1603-设计停车系统.py:6
Method
addDigits
:type num: int :rtype: int
0258.各位相加/0258-各位相加.py:2
Method
addDigits
:type num: int :rtype: int
0258.各位相加/0258-各位相加 2.py:2
Method
addDigits
(self, num: int)
LeetCode-Python/0258.各位相加/0258-各位相加.py:2
Method
addNegabinary
(self, arr1: List[int], arr2: List[int])
1073.负二进制数相加/1073-负二进制数相加.py:2
Method
addNegabinary
(self, arr1: List[int], arr2: List[int])
LeetCode-Python/1073.负二进制数相加/1073-负二进制数相加.py:2
Method
addNum
:type num: int :rtype: None
0295.数据流的中位数/0295-数据流的中位数.py:19
Method
addScore
:type playerId: int :type score: int :rtype: None
1244.力扣排行榜/1244-力扣排行榜.py:8
Method
addStrings
:type num1: str :type num2: str :rtype: str
0415.字符串相加/0415-字符串相加.py:2
Method
addToArrayForm
:type A: List[int] :type K: int :rtype: List[int]
0989.数组形式的整数加法/0989-数组形式的整数加法.py:2
Method
addTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0445.两数相加II/0445-两数相加II.py:8
Method
addTwoNumbers
(self, l1: Optional[ListNode], l2: Optional[ListNode])
LeetCode-Python/0002.两数相加/0002-两数相加.py:7
Method
addTwoNumbers
(self, l1: ListNode, l2: ListNode)
LeetCode-Python/面试题 02.05.链表求和/面试题 02.05-链表求和.py:8
Method
addTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0002.两数相加/0002-两数相加 2.py:8
Method
addTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0002.两数相加/0002-两数相加.py:8
Method
addTwoNumbers
0002.两数相加/0002-两数相加.cpp:11
Method
addTwoNumbers
(self, l1: ListNode, l2: ListNode)
面试题 02.05.链表求和/面试题 02.05-链表求和.py:8
Method
addWord
Adds a word into the data structure. :type word: str :rtype: None
0211.添加与搜索单词-数据结构设计/0211-添加与搜索单词-数据结构设计.py:9
Method
alertNames
:type keyName: List[str] :type keyTime: List[str] :rtype: List[str]
1604.警告一小时内使用相同员工卡大于等于三次的人/1604-警告一小时内使用相同员工卡大于等于三次的人.py:2
Method
alienOrder
(self, words: List[str])
0269.火星词典/0269-火星词典.py:2
Method
allCellsDistOrder
:type R: int :type C: int :type r0: int :type c0: int :rtype: List[List[int]]
1030.距离顺序排列矩阵单元格/1030-距离顺序排列矩阵单元格.py:2
Method
allPathsSourceTarget
:type graph: List[List[int]] :rtype: List[List[int]]
0797.所有可能的路径/0797-所有可能的路径.py:2
Method
anagramMappings
:type A: List[int] :type B: List[int] :rtype: List[int]
0760.找出变位映射/0760-找出变位映射.py:2
Method
angleClock
:type hour: int :type minutes: int :rtype: float
1344.时钟指针的夹角/1344-时钟指针的夹角.py:2
Method
applyOperations
(self, nums: List[int])
LeetCode-Python/2460.对数组执行操作/2460-对数组执行操作.py:2
Method
applyOperations
(self, nums: List[int])
2460.对数组执行操作/2460-对数组执行操作.py:2
Method
areOccurrencesEqual
(self, s: str)
LeetCode-Python/1941.检查是否所有字符出现次数相同/1941-检查是否所有字符出现次数相同.py:2
Method
areOccurrencesEqual
(self, s: str)
1941.检查是否所有字符出现次数相同/1941-检查是否所有字符出现次数相同.py:2
Method
arrangeCoins
:type n: int :rtype: int
0441.排列硬币/0441-排列硬币.py:2
Method
arrangeWords
:type text: str :rtype: str
1451.重新排列句子中的单词/1451-重新排列句子中的单词.py:2
Method
arrayPairSum
:type nums: List[int] :rtype: int
0561.数组拆分I/0561-数组拆分I.py:2
Method
arrayRankTransform
:type arr: List[int] :rtype: List[int]
1331.数组序号转换/1331-数组序号转换.py:2
Method
arraysIntersection
:type arr1: List[int] :type arr2: List[int] :type arr3: List[int] :rtype: List[int]
1213.三个有序数组的交集/1213-三个有序数组的交集.py:2
Method
average
:type salary: List[int] :rtype: float
1491.去掉最低工资和最高工资后的工资平均值/1491-去掉最低工资和最高工资后的工资平均值.py:2
Method
average
:type salary: List[int] :rtype: float
5432.去掉最低工资和最高工资后的工资平均值/5432-去掉最低工资和最高工资后的工资平均值.py:2
Method
averageOfLevels
:type root: TreeNode :rtype: List[float]
0637.二叉树的层平均值/0637-二叉树的层平均值 2.py:9
Method
averageOfLevels
:type root: TreeNode :rtype: List[float]
0637.二叉树的层平均值/0637-二叉树的层平均值.py:9
Method
averageOfLevels
(self, root: Optional[TreeNode])
LeetCode-Python/0637.二叉树的层平均值/0637-二叉树的层平均值.py:8
Method
averageOfSubtree
(self, root: Optional[TreeNode])
LeetCode-Python/2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:8
Method
averageOfSubtree
(self, root: Optional[TreeNode])
2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:8
Method
averageValue
(self, nums: List[int])
LeetCode-Python/2455.可被三整除的偶数的平均值/2455-可被三整除的偶数的平均值.py:2
Method
averageValue
(self, nums: List[int])
2455.可被三整除的偶数的平均值/2455-可被三整除的偶数的平均值.py:2
Method
backspaceCompare
:type S: str :type T: str :rtype: bool
0844.比较含退格的字符串/0844-比较含退格的字符串.py:2
Method
backtrack
(dice, face, t)
1155.掷骰子的N种方法/1155-掷骰子的N种方法.py:10
Method
backwardInorder
(node)
LeetCode-Python/0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树.py:10
Method
backwardInorder
(node)
LeetCode-Python/1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:11
Method
balanceBST
:type root: TreeNode :rtype: TreeNode
1382.将二叉搜索树变平衡/1382-将二叉搜索树变平衡.py:9
Method
balancedStringSplit
(self, s: str)
LeetCode-Python/1221.分割平衡字符串/1221-分割平衡字符串.py:2
Method
balancedStringSplit
:type s: str :rtype: int
1221.分割平衡字符串/1221-分割平衡字符串 2.py:2
Method
balancedStringSplit
:type s: str :rtype: int
1221.分割平衡字符串/1221-分割平衡字符串.py:2
Method
bar
:type printBar: method :rtype: void
1115.交替打印FooBar/1115-交替打印FooBar.py:23
Method
baseNeg2
:type N: int :rtype: str
1017.负二进制转换/1017-负二进制转换 2.py:2
Method
baseNeg2
:type N: int :rtype: str
1017.负二进制转换/1017-负二进制转换.py:2
Method
baseNeg2
(self, n: int)
LeetCode-Python/1017.负二进制转换/1017-负二进制转换.py:2
Method
bfs
(queue)
0126.单词接龙II/0126-单词接龙II.py:66
Method
bfs
(queue)
0133.克隆图/0133-克隆图 2.py:11
Method
bfs
(queue)
0133.克隆图/0133-克隆图.py:11
Method
binaryGap
:type N: int :rtype: int
0868.二进制间距/0868-二进制间距.py:2
Method
binaryTreePaths
:type root: TreeNode :rtype: List[str]
0257.二叉树的所有路径/0257-二叉树的所有路径.py:9
Method
binaryTreePaths
:type root: TreeNode :rtype: List[str]
0257.二叉树的所有路径/0257-二叉树的所有路径 2.py:9
Method
binaryTreePaths
(self, root: Optional[TreeNode])
LeetCode-Python/0257.二叉树的所有路径/0257-二叉树的所有路径.py:8
Method
birth
:type parentName: str :type childName: str :rtype: None
1600.皇位继承顺序/1600-皇位继承顺序.py:11
Method
bitwiseComplement
:type N: int :rtype: int
1009.十进制整数的反码/1009-十进制整数的反码.py:2
Method
breakPalindrome
:type palindrome: str :rtype: str
1328.破坏回文串/1328-破坏回文串.py:2
Method
brokenCalc
:type X: int :type Y: int :rtype: int
0991.坏了的计算器/0991-坏了的计算器.py:2
Method
bstFromPreorder
(self, preorder: List[int])
1008.前序遍历构造二叉搜索树/1008-前序遍历构造二叉搜索树.py:8
Method
bstFromPreorder
:type preorder: List[int] :rtype: TreeNode
1008.先序遍历构造二叉树/1008-先序遍历构造二叉树.py:9
Method
bstFromPreorder
(self, preorder: List[int])
LeetCode-Python/1008.前序遍历构造二叉搜索树/1008-前序遍历构造二叉搜索树.py:8
Method
bstToGst
:type root: TreeNode :rtype: TreeNode
1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树 2.py:9
Method
bstToGst
:type root: TreeNode :rtype: TreeNode
1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:9
Method
bstToGst
(self, root: TreeNode)
LeetCode-Python/1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:8
Method
btreeGameWinningMove
:type root: TreeNode :type n: int :type x: int :rtype: bool
1145.二叉树着色游戏/1145-二叉树着色游戏.py:9
Method
buildArray
:type target: List[int] :type n: int :rtype: List[str]
1441.用栈操作构建数组/1441-用栈操作构建数组.py:2
Method
buildArray
:type target: List[int] :type n: int :rtype: List[str]
1441.用栈操作构建数组/1441-用栈操作构建数组 2.py:2
Method
buildArray
(self, target: List[int], n: int)
LeetCode-Python/1441.用栈操作构建数组/1441-用栈操作构建数组.py:2
Method
buildArray
(self, nums: List[int])
LeetCode-Python/1920.基于排列构建数组/1920-基于排列构建数组.py:2
Method
buildArray
(self, nums: List[int])
1920.基于排列构建数组/1920-基于排列构建数组.py:2
Method
buildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树 2.py:9
Method
buildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树.py:9
← previous
next →
201–300 of 2,012, ranked by callers