MCPcopy Create free account

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

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

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
Methodadd
(self, val: int)
0703.数据流中的第K大元素/0703-数据流中的第K大元素.py:12
MethodaddBack
(self, num: int)
2336.无限集中的最小数字/2336-无限集中的最小数字.py:14
MethodaddBack
(self, num: int)
LeetCode-Python/2336.无限集中的最小数字/2336-无限集中的最小数字.py:14
MethodaddBinary
:type a: str :type b: str :rtype: str
0067.二进制求和/0067-二进制求和.py:2
MethodaddCar
:type carType: int :rtype: bool
1603.设计停车系统/1603-设计停车系统.py:11
MethodaddCar
:type carType: int :rtype: bool
1603.设计停车系统/1603-设计停车系统 2.py:11
MethodaddCar
(self, carType: int)
LeetCode-Python/1603.设计停车系统/1603-设计停车系统.py:6
MethodaddDigits
:type num: int :rtype: int
0258.各位相加/0258-各位相加.py:2
MethodaddDigits
:type num: int :rtype: int
0258.各位相加/0258-各位相加 2.py:2
MethodaddDigits
(self, num: int)
LeetCode-Python/0258.各位相加/0258-各位相加.py:2
MethodaddNegabinary
(self, arr1: List[int], arr2: List[int])
1073.负二进制数相加/1073-负二进制数相加.py:2
MethodaddNegabinary
(self, arr1: List[int], arr2: List[int])
LeetCode-Python/1073.负二进制数相加/1073-负二进制数相加.py:2
MethodaddNum
:type num: int :rtype: None
0295.数据流的中位数/0295-数据流的中位数.py:19
MethodaddScore
:type playerId: int :type score: int :rtype: None
1244.力扣排行榜/1244-力扣排行榜.py:8
MethodaddStrings
:type num1: str :type num2: str :rtype: str
0415.字符串相加/0415-字符串相加.py:2
MethodaddToArrayForm
:type A: List[int] :type K: int :rtype: List[int]
0989.数组形式的整数加法/0989-数组形式的整数加法.py:2
MethodaddTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0445.两数相加II/0445-两数相加II.py:8
MethodaddTwoNumbers
(self, l1: Optional[ListNode], l2: Optional[ListNode])
LeetCode-Python/0002.两数相加/0002-两数相加.py:7
MethodaddTwoNumbers
(self, l1: ListNode, l2: ListNode)
LeetCode-Python/面试题 02.05.链表求和/面试题 02.05-链表求和.py:8
MethodaddTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0002.两数相加/0002-两数相加 2.py:8
MethodaddTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
0002.两数相加/0002-两数相加.py:8
MethodaddTwoNumbers
0002.两数相加/0002-两数相加.cpp:11
MethodaddTwoNumbers
(self, l1: ListNode, l2: ListNode)
面试题 02.05.链表求和/面试题 02.05-链表求和.py:8
MethodaddWord
Adds a word into the data structure. :type word: str :rtype: None
0211.添加与搜索单词-数据结构设计/0211-添加与搜索单词-数据结构设计.py:9
MethodalertNames
:type keyName: List[str] :type keyTime: List[str] :rtype: List[str]
1604.警告一小时内使用相同员工卡大于等于三次的人/1604-警告一小时内使用相同员工卡大于等于三次的人.py:2
MethodalienOrder
(self, words: List[str])
0269.火星词典/0269-火星词典.py:2
MethodallCellsDistOrder
:type R: int :type C: int :type r0: int :type c0: int :rtype: List[List[int]]
1030.距离顺序排列矩阵单元格/1030-距离顺序排列矩阵单元格.py:2
MethodallPathsSourceTarget
:type graph: List[List[int]] :rtype: List[List[int]]
0797.所有可能的路径/0797-所有可能的路径.py:2
MethodanagramMappings
:type A: List[int] :type B: List[int] :rtype: List[int]
0760.找出变位映射/0760-找出变位映射.py:2
MethodangleClock
:type hour: int :type minutes: int :rtype: float
1344.时钟指针的夹角/1344-时钟指针的夹角.py:2
MethodapplyOperations
(self, nums: List[int])
LeetCode-Python/2460.对数组执行操作/2460-对数组执行操作.py:2
MethodapplyOperations
(self, nums: List[int])
2460.对数组执行操作/2460-对数组执行操作.py:2
MethodareOccurrencesEqual
(self, s: str)
LeetCode-Python/1941.检查是否所有字符出现次数相同/1941-检查是否所有字符出现次数相同.py:2
MethodareOccurrencesEqual
(self, s: str)
1941.检查是否所有字符出现次数相同/1941-检查是否所有字符出现次数相同.py:2
MethodarrangeCoins
:type n: int :rtype: int
0441.排列硬币/0441-排列硬币.py:2
MethodarrangeWords
:type text: str :rtype: str
1451.重新排列句子中的单词/1451-重新排列句子中的单词.py:2
MethodarrayPairSum
:type nums: List[int] :rtype: int
0561.数组拆分I/0561-数组拆分I.py:2
MethodarrayRankTransform
:type arr: List[int] :rtype: List[int]
1331.数组序号转换/1331-数组序号转换.py:2
MethodarraysIntersection
:type arr1: List[int] :type arr2: List[int] :type arr3: List[int] :rtype: List[int]
1213.三个有序数组的交集/1213-三个有序数组的交集.py:2
Methodaverage
:type salary: List[int] :rtype: float
1491.去掉最低工资和最高工资后的工资平均值/1491-去掉最低工资和最高工资后的工资平均值.py:2
Methodaverage
:type salary: List[int] :rtype: float
5432.去掉最低工资和最高工资后的工资平均值/5432-去掉最低工资和最高工资后的工资平均值.py:2
MethodaverageOfLevels
:type root: TreeNode :rtype: List[float]
0637.二叉树的层平均值/0637-二叉树的层平均值 2.py:9
MethodaverageOfLevels
:type root: TreeNode :rtype: List[float]
0637.二叉树的层平均值/0637-二叉树的层平均值.py:9
MethodaverageOfLevels
(self, root: Optional[TreeNode])
LeetCode-Python/0637.二叉树的层平均值/0637-二叉树的层平均值.py:8
MethodaverageOfSubtree
(self, root: Optional[TreeNode])
LeetCode-Python/2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:8
MethodaverageOfSubtree
(self, root: Optional[TreeNode])
2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:8
MethodaverageValue
(self, nums: List[int])
LeetCode-Python/2455.可被三整除的偶数的平均值/2455-可被三整除的偶数的平均值.py:2
MethodaverageValue
(self, nums: List[int])
2455.可被三整除的偶数的平均值/2455-可被三整除的偶数的平均值.py:2
MethodbackspaceCompare
:type S: str :type T: str :rtype: bool
0844.比较含退格的字符串/0844-比较含退格的字符串.py:2
Methodbacktrack
(dice, face, t)
1155.掷骰子的N种方法/1155-掷骰子的N种方法.py:10
MethodbackwardInorder
(node)
LeetCode-Python/0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树.py:10
MethodbackwardInorder
(node)
LeetCode-Python/1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:11
MethodbalanceBST
:type root: TreeNode :rtype: TreeNode
1382.将二叉搜索树变平衡/1382-将二叉搜索树变平衡.py:9
MethodbalancedStringSplit
(self, s: str)
LeetCode-Python/1221.分割平衡字符串/1221-分割平衡字符串.py:2
MethodbalancedStringSplit
:type s: str :rtype: int
1221.分割平衡字符串/1221-分割平衡字符串 2.py:2
MethodbalancedStringSplit
:type s: str :rtype: int
1221.分割平衡字符串/1221-分割平衡字符串.py:2
Methodbar
:type printBar: method :rtype: void
1115.交替打印FooBar/1115-交替打印FooBar.py:23
MethodbaseNeg2
:type N: int :rtype: str
1017.负二进制转换/1017-负二进制转换 2.py:2
MethodbaseNeg2
:type N: int :rtype: str
1017.负二进制转换/1017-负二进制转换.py:2
MethodbaseNeg2
(self, n: int)
LeetCode-Python/1017.负二进制转换/1017-负二进制转换.py:2
Methodbfs
(queue)
0126.单词接龙II/0126-单词接龙II.py:66
Methodbfs
(queue)
0133.克隆图/0133-克隆图 2.py:11
Methodbfs
(queue)
0133.克隆图/0133-克隆图.py:11
MethodbinaryGap
:type N: int :rtype: int
0868.二进制间距/0868-二进制间距.py:2
MethodbinaryTreePaths
:type root: TreeNode :rtype: List[str]
0257.二叉树的所有路径/0257-二叉树的所有路径.py:9
MethodbinaryTreePaths
:type root: TreeNode :rtype: List[str]
0257.二叉树的所有路径/0257-二叉树的所有路径 2.py:9
MethodbinaryTreePaths
(self, root: Optional[TreeNode])
LeetCode-Python/0257.二叉树的所有路径/0257-二叉树的所有路径.py:8
Methodbirth
:type parentName: str :type childName: str :rtype: None
1600.皇位继承顺序/1600-皇位继承顺序.py:11
MethodbitwiseComplement
:type N: int :rtype: int
1009.十进制整数的反码/1009-十进制整数的反码.py:2
MethodbreakPalindrome
:type palindrome: str :rtype: str
1328.破坏回文串/1328-破坏回文串.py:2
MethodbrokenCalc
:type X: int :type Y: int :rtype: int
0991.坏了的计算器/0991-坏了的计算器.py:2
MethodbstFromPreorder
(self, preorder: List[int])
1008.前序遍历构造二叉搜索树/1008-前序遍历构造二叉搜索树.py:8
MethodbstFromPreorder
:type preorder: List[int] :rtype: TreeNode
1008.先序遍历构造二叉树/1008-先序遍历构造二叉树.py:9
MethodbstFromPreorder
(self, preorder: List[int])
LeetCode-Python/1008.前序遍历构造二叉搜索树/1008-前序遍历构造二叉搜索树.py:8
MethodbstToGst
:type root: TreeNode :rtype: TreeNode
1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树 2.py:9
MethodbstToGst
:type root: TreeNode :rtype: TreeNode
1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:9
MethodbstToGst
(self, root: TreeNode)
LeetCode-Python/1038.从二叉搜索树到更大和树/1038-从二叉搜索树到更大和树.py:8
MethodbtreeGameWinningMove
:type root: TreeNode :type n: int :type x: int :rtype: bool
1145.二叉树着色游戏/1145-二叉树着色游戏.py:9
MethodbuildArray
:type target: List[int] :type n: int :rtype: List[str]
1441.用栈操作构建数组/1441-用栈操作构建数组.py:2
MethodbuildArray
:type target: List[int] :type n: int :rtype: List[str]
1441.用栈操作构建数组/1441-用栈操作构建数组 2.py:2
MethodbuildArray
(self, target: List[int], n: int)
LeetCode-Python/1441.用栈操作构建数组/1441-用栈操作构建数组.py:2
MethodbuildArray
(self, nums: List[int])
LeetCode-Python/1920.基于排列构建数组/1920-基于排列构建数组.py:2
MethodbuildArray
(self, nums: List[int])
1920.基于排列构建数组/1920-基于排列构建数组.py:2
MethodbuildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树 2.py:9
MethodbuildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树.py:9
← previousnext →201–300 of 2,012, ranked by callers