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
flipAndInvertImage
:type A: List[List[int]] :rtype: List[List[int]]
0832.翻转图像/0832-翻转图像 2.py:2
Method
flipAndInvertImage
(self, image: List[List[int]])
LeetCode-Python/0832.翻转图像/0832-翻转图像.py:2
Method
flipEquiv
:type root1: TreeNode :type root2: TreeNode :rtype: bool
0951.翻转等价二叉树/0951-翻转等价二叉树.py:9
Method
floodFill
:type image: List[List[int]] :type sr: int :type sc: int :type newColor: int :rtype: List[List[int]]
0733.图像渲染/0733-图像渲染.py:3
Method
foo
:type printFoo: method :rtype: void
1115.交替打印FooBar/1115-交替打印FooBar.py:10
Method
fourSum
:type nums: List[int] :type target: int :rtype: List[List[int]]
0018.四数之和/0018-四数之和.py:2
Method
fourSumCount
:type A: List[int] :type B: List[int] :type C: List[int] :type D: List[int] :rtype: int
0454.四数相加II/0454-四数相加II.py:2
Method
frequencySort
:type nums: List[int] :rtype: List[int]
1636.按照频率将数组升序排序/1636-按照频率将数组升序排序.py:2
Method
frequencySort
:type s: str :rtype: str
0451.根据字符出现频率排序/0451-根据字符出现频率排序 2.py:2
Method
frequencySort
:type s: str :rtype: str
0451.根据字符出现频率排序/0451-根据字符出现频率排序.py:2
Method
frequencySort
(self, s: str)
LeetCode-Python/0451.根据字符出现频率排序/0451-根据字符出现频率排序.py:3
Method
frogPosition
:type n: int :type edges: List[List[int]] :type t: int :type target: int :rtype: float
1377.T秒后青蛙的位置/1377-T秒后青蛙的位置.py:2
Method
func
(word)
1170.比较字符串最小字母出现频次/1170-比较字符串最小字母出现频次.py:9
Method
func2
(word)
1170.比较字符串最小字母出现频次/1170-比较字符串最小字母出现频次.py:15
Method
game
(self, guess: List[int], answer: List[int])
LCP 01.猜数字/LCP 01-猜数字.py:2
Method
game
(self, guess: List[int], answer: List[int])
LeetCode-Python/LCP 01.猜数字/LCP 01-猜数字.py:2
Method
gameOfLife
:type board: List[List[int]] :rtype: None Do not return anything, modify board in-place instead.
0289.生命游戏/0289-生命游戏 2.py:2
Method
gameOfLife
:type board: List[List[int]] :rtype: None Do not return anything, modify board in-place instead.
0289.生命游戏/0289-生命游戏.py:2
Method
gameOfLife
Do not return anything, modify board in-place instead.
LeetCode-Python/0289.生命游戏/0289-生命游戏.py:2
Method
garbageCollection
(self, garbage: List[str], travel: List[int])
2391.收集垃圾的最少总时间/2391-收集垃圾的最少总时间.py:2
Method
garbageCollection
(self, garbage: List[str], travel: List[int])
LeetCode-Python/2391.收集垃圾的最少总时间/2391-收集垃圾的最少总时间.py:2
Method
gardenNoAdj
:type N: int :type paths: List[List[int]] :rtype: List[int]
1042.不邻接植花/1042-不邻接植花.py:2
Method
gcd
(a, b)
0914.卡牌分组/0914-卡牌分组.py:7
Method
gcd
(a, b)
0365.水壶问题/0365-水壶问题.py:17
Method
gcdOfStrings
:type str1: str :type str2: str :rtype: str
1071.字符串的最大公因子/1071-字符串的最大公因子.py:2
Method
generate
(s, tmp)
1087.字母切换/1087-字母切换.py:7
Method
generate
:type numRows: int :rtype: List[List[int]]
0118.杨辉三角/0118-杨辉三角.py:2
Method
generate
0118.杨辉三角/0118-杨辉三角.cpp:3
Method
generate
(queue)
0133.克隆图/0133-克隆图 2.py:32
Method
generate
(queue)
0133.克隆图/0133-克隆图.py:32
Method
generateMatrix
:type n: int :rtype: List[List[int]]
0059.螺旋矩阵II/0059-螺旋矩阵II.py:2
Method
generatePalindromes
:type s: str :rtype: List[str]
0267.回文排列II/0267-回文排列II.py:2
Method
generateParenthesis
:type n: int :rtype: List[str]
0022.括号生成/0022-括号生成.py:2
Method
generateParenthesis
:type n: int :rtype: List[str]
0022.括号生成/0022-括号生成 2.py:2
Method
generateParenthesis
(self, n: int)
LeetCode-Python/0022.括号生成/0022-括号生成.py:2
Method
generateParenthesis
(self, n: int)
LeetCode-Python/剑指 Offer II 085.生成匹配的括号/剑指 Offer II 085-生成匹配的括号.py:2
Method
generateParenthesis
(self, n: int)
剑指 Offer II 085.生成匹配的括号/剑指 Offer II 085-生成匹配的括号.py:2
Method
generatePossibleNextMoves
:type s: str :rtype: List[str]
0293.翻转游戏/0293-翻转游戏.py:2
Method
generateTheString
:type n: int :rtype: str
1374.生成每种字符都是奇数个的字符串/1374-生成每种字符都是奇数个的字符串 2.py:2
Method
generateTheString
:type n: int :rtype: str
1374.生成每种字符都是奇数个的字符串/1374-生成每种字符都是奇数个的字符串.py:2
Method
generateTheString
(self, n: int)
LeetCode-Python/1374.生成每种字符都是奇数个的字符串/1374-生成每种字符都是奇数个的字符串.py:2
Method
generator
(l)
1382.将二叉搜索树变平衡/1382-将二叉搜索树变平衡.py:21
Method
get
:type key: int :rtype: int
面试题16.25.LRU缓存/面试题16.25-LRU缓存.py:20
Method
get
(self, word: str)
面试题 16.02.单词频率/面试题 16.02-单词频率.py:7
Method
get
:type path: str :rtype: int
1166.设计文件系统/1166-设计文件系统.py:26
Method
getAverageOfSubtree
(node)
LeetCode-Python/2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:11
Method
getAverageOfSubtree
(node)
2265.统计值等于子树平均值的节点数/2265-统计值等于子树平均值的节点数.py:11
Method
getAverageTime
:type startStation: str :type endStation: str :rtype: float
1396.设计地铁系统/1396-设计地铁系统.py:34
Method
getConcatenation
(self, nums: List[int])
LeetCode-Python/1929.数组串联/1929-数组串联.py:2
Method
getConcatenation
(self, nums: List[int])
1929.数组串联/1929-数组串联.py:2
Method
getDecimalValue
(self, head: ListNode)
1290.二进制链表转整数/1290-二进制链表转整数.py:7
Method
getDecimalValue
(self, head: ListNode)
LeetCode-Python/1290.二进制链表转整数/1290-二进制链表转整数.py:7
Method
getFactors
:type n: int :rtype: List[List[int]]
0254.因子的组合/0254-因子的组合.py:2
Method
getHeight
(node)
面试题 04.04.检查平衡性/面试题 04.04-检查平衡性.py:13
Method
getHeight
(node, h)
0110.平衡二叉树/0110-平衡二叉树.py:19
Method
getHeight
(node)
LeetCode-Python/面试题 04.04.检查平衡性/面试题 04.04-检查平衡性.py:13
Method
getHeight
(node)
1245.树的直径/1245-树的直径.py:17
Method
getHint
:type secret: str :type guess: str :rtype: str
0299.猜数字游戏/0299-猜数字游戏.py:2
Method
getHits
Return the number of hits in the past 5 minutes. @param timestamp - The current timestamp (in seconds granularity). :type tim
0362.敲击计数器/0362-敲击计数器.py:19
Method
getImportance
:type employees: Employee :type id: int :rtype: int
0690.员工的重要性/0690-员工的重要性.py:14
Method
getInheritanceOrder
:rtype: List[str]
1600.皇位继承顺序/1600-皇位继承顺序.py:27
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
剑指 Offer 52.两个链表的第一个公共节点/剑指 Offer 52-两个链表的第一个公共节点.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
剑指 Offer II 023.两个链表的第一个重合节点/剑指 Offer II 023-两个链表的第一个重合节点.py:8
Method
getIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
0160.相交链表/0160-相交链表.py:8
Method
getIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
0160.相交链表/0160-相交链表 2.py:8
Method
getIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
面试题52.两个链表的第一个公共节点/面试题52-两个链表的第一个公共节点.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
面试题 02.07.链表相交/面试题 02.07-链表相交.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
LeetCode-Python/剑指 Offer 52.两个链表的第一个公共节点/剑指 Offer 52-两个链表的第一个公共节点.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
LeetCode-Python/剑指 Offer II 023.两个链表的第一个重合节点/剑指 Offer II 023-两个链表的第一个重合节点.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
LeetCode-Python/0160.相交链表/0160-相交链表.py:8
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
LeetCode-Python/面试题 02.07.链表相交/面试题 02.07-链表相交.py:8
Method
getKthFromEnd
(self, head: ListNode, k: int)
剑指 Offer 22.链表中倒数第k个节点/剑指 Offer 22-链表中倒数第k个节点.py:8
Method
getKthFromEnd
(self, head: ListNode, k: int)
LeetCode-Python/剑指 Offer 22.链表中倒数第k个节点/剑指 Offer 22-链表中倒数第k个节点.py:8
Method
getLeastNumbers
:type arr: List[int] :type k: int :rtype: List[int]
面试题40.最小的k个数/面试题40-最小的k个数.py:2
Method
getLinkedListLength
(l)
0445.两数相加II/0445-两数相加II.py:14
Method
getLonelyNodes
(self, root: Optional[TreeNode])
LeetCode-Python/1469.寻找所有的独生节点/1469-寻找所有的独生节点.py:8
Method
getLonelyNodes
:type root: TreeNode :rtype: List[int]
1469.寻找所有的独生节点/1469-寻找所有的独生节点 2.py:8
Method
getLonelyNodes
:type root: TreeNode :rtype: List[int]
1469.寻找所有的独生节点/1469-寻找所有的独生节点.py:8
Method
getLucky
(self, s: str, k: int)
1945.字符串转化后的各位数字之和/1945-字符串转化后的各位数字之和.py:2
Method
getLucky
(self, s: str, k: int)
LeetCode-Python/1945.字符串转化后的各位数字之和/1945-字符串转化后的各位数字之和.py:2
Method
getMaximumGenerated
:type n: int :rtype: int
1646.获取生成数组中的最大值/1646-获取生成数组中的最大值.py:2
Method
getMin
:rtype: int
0155.最小栈/0155-最小栈 2.py:35
Method
getMin
:rtype: int
0155.最小栈/0155-最小栈.py:35
Method
getMin
(self)
LeetCode-Python/0155.最小栈/0155-最小栈.py:21
Method
getMin
(self)
LeetCode-Python/面试题 03.02.栈的最小值/面试题 03.02-栈的最小值.py:25
Method
getMin
(self)
面试题 03.02.栈的最小值/面试题 03.02-栈的最小值.py:25
Method
getMinimumDifference
:type root: TreeNode :rtype: int
0530.二叉搜索树的最小绝对差/0530-二叉搜索树的最小绝对差.py:9
Method
getModifiedArray
:type length: int :type updates: List[List[int]] :rtype: List[int]
0370.区间加法/0370-区间加法.py:2
Method
getOrder
:type tasks: List[List[int]] :rtype: List[int]
1834.单线程CPU/1834-单线程CPU.py:2
Method
getPermutation
:type n: int :type k: int :rtype: str
0060.第k个排列/0060-第k个排列.py:2
Method
getProduct
:type k: int :rtype: int
1352.最后K个数的乘积/1352-最后K个数的乘积.py:16
Method
getRandom
(self)
0382.链表随机节点/0382-链表随机节点.py:16
Method
getRandom
Get a random element from the set. :rtype: int
0380.常数时间插入、删除和获取随机元素/0380-常数时间插入、删除和获取随机元素.py:53
Method
getRandom
(self)
LeetCode-Python/0382.链表随机节点/0382-链表随机节点.py:16
Method
getRow
:type rowIndex: int :rtype: List[int]
0119.杨辉三角II/0119-杨辉三角II.py:2
Method
getStrongest
:type arr: List[int] :type k: int :rtype: List[int]
1471.数组中的k个最强值/1471-数组中的k个最强值.py:2
Method
getSum
:type a: int :type b: int :rtype: int
0371.两整数之和/0371-两整数之和.py:2
Method
getTargetCopy
(self, original: TreeNode, cloned: TreeNode, target: TreeNode)
1379.找出克隆二叉树中的相同节点/1379-找出克隆二叉树中的相同节点.py:9
Method
getTargetCopy
(self, original: TreeNode, cloned: TreeNode, target: TreeNode)
LeetCode-Python/1379.找出克隆二叉树中的相同节点/1379-找出克隆二叉树中的相同节点.py:9
Method
getValue
:type row: int :type col: int :rtype: int
1476.子矩形查询/1476-子矩形查询.py:23
← previous
next →
801–900 of 2,012, ranked by callers