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
computeArea
:type A: int :type B: int :type C: int :type D: int :type E: int :type F: int :type G: int
0223.矩形面积/0223-矩形面积.py:2
Method
connect
:type root: Node :rtype: Node
0116.填充每个节点的下一个右侧节点指针/0116-填充每个节点的下一个右侧节点指针.py:11
Method
connect
:type root: Node :rtype: Node
0116.填充每个节点的下一个右侧节点指针/0116-填充每个节点的下一个右侧节点指针 2.py:11
Method
connect
(self, root: 'Optional[Node]')
LeetCode-Python/0116.填充每个节点的下一个右侧节点指针/0116-填充每个节点的下一个右侧节点指针.py:12
Method
connect
(self, root: 'Node')
LeetCode-Python/0117.填充每个节点的下一个右侧节点指针II/0117-填充每个节点的下一个右侧节点指针II.py:12
Method
connect
:type root: Node :rtype: Node
0117.填充每个节点的下一个右侧节点指针II/0117-填充每个节点的下一个右侧节点指针II.py:11
Method
connect
:type root: Node :rtype: Node
0117.填充每个节点的下一个右侧节点指针II/0117-填充每个节点的下一个右侧节点指针II 2.py:11
Method
connectSticks
:type sticks: List[int] :rtype: int
1167.连接棒材的最低费用/1167-连接棒材的最低费用.py:2
Method
constructArr
:type a: List[int] :rtype: List[int]
面试题66.构建乘积数组/面试题66-构建乘积数组.py:2
Method
constructFromPrePost
:type pre: List[int] :type post: List[int] :rtype: TreeNode
0889.根据前序和后序遍历构造二叉树/0889-根据前序和后序遍历构造二叉树.py:9
Method
constructMaximumBinaryTree
(self, nums: List[int])
LeetCode-Python/0654.最大二叉树/0654-最大二叉树.py:8
Method
constructMaximumBinaryTree
:type nums: List[int] :rtype: TreeNode
0654.最大二叉树/0654-最大二叉树 2.py:9
Method
constructMaximumBinaryTree
:type nums: List[int] :rtype: TreeNode
0654.最大二叉树/0654-最大二叉树.py:9
Method
contains
Returns true if this set contains the specified element :type key: int :rtype: bool
0705.设计哈希集合/0705-设计哈希集合.py:25
Method
containsCycle
:type grid: List[List[str]] :rtype: bool
1559.二维网格图中探测环/1559-二维网格图中探测环.py:2
Method
containsDuplicate
:type nums: List[int] :rtype: bool
0217.存在重复元素/0217-存在重复元素.py:2
Method
containsNearbyAlmostDuplicate
:type nums: List[int] :type k: int :type t: int :rtype: bool
0220.存在重复元素III/0220-存在重复元素III.py:2
Method
containsNearbyDuplicate
:type nums: List[int] :type k: int :rtype: bool
0219.存在重复元素II/0219-存在重复元素II.py:2
Method
containsNearbyDuplicate
:type nums: List[int] :type k: int :rtype: bool
0219.存在重复元素II/0219-存在重复元素II 2.py:2
Method
containsNearbyDuplicate
(self, nums: List[int], k: int)
LeetCode-Python/0219.存在重复元素II/0219-存在重复元素II.py:2
Method
convert
(node)
0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树.py:19
Method
convert
(node)
0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树 2.py:19
Method
convert
:type s: str :type numRows: int :rtype: str
0006.Z字形变换/0006-Z字形变换.py:2
Method
convert
(l)
1169.查询无效交易/1169-查询无效交易.py:12
Method
convertBST
:type root: TreeNode :rtype: TreeNode
0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树.py:9
Method
convertBST
:type root: TreeNode :rtype: TreeNode
0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树 2.py:9
Method
convertBST
(self, root: Optional[TreeNode])
LeetCode-Python/0538.把二叉搜索树转换为累加树/0538-把二叉搜索树转换为累加树.py:8
Method
convertBST
(self, root: TreeNode)
LeetCode-Python/剑指 Offer II 054.所有大于等于节点的值之和/剑指 Offer II 054-所有大于等于节点的值之和.py:33
Method
convertBST
(self, root: TreeNode)
剑指 Offer II 054.所有大于等于节点的值之和/剑指 Offer II 054-所有大于等于节点的值之和.py:33
Method
convertTemperature
(self, celsius: float)
LeetCode-Python/2469.温度转换/2469-温度转换.py:2
Method
convertTemperature
(self, celsius: float)
2469.温度转换/2469-温度转换.py:2
Method
convertToTitle
:type n: int :rtype: str
0168.Excel表列名称/0168-Excel表列名称.py:2
Method
copyRandomBinaryTree
(self, root: 'Optional[Node]')
1485.克隆含随机指针的二叉树/1485-克隆含随机指针的二叉树.py:11
Method
copyRandomBinaryTree
(self, root: 'Optional[Node]')
LeetCode-Python/1485.克隆含随机指针的二叉树/1485-克隆含随机指针的二叉树.py:11
Method
copyRandomList
0138.复制带随机指针的链表/0138-复制带随机指针的链表.cpp:11
Method
copyRandomList
:type head: Node :rtype: Node
0138.复制带随机指针的链表/0138-复制带随机指针的链表.py:10
Method
copyRandomList
:type head: Node :rtype: Node
0138.复制带随机指针的链表/0138-复制带随机指针的链表 2.py:10
Method
copyRandomList
(self, head: 'Node')
剑指 Offer 35.复杂链表的复制/剑指 Offer 35-复杂链表的复制.py:10
Method
copyRandomList
(self, head: 'Optional[Node]')
LeetCode-Python/0138.复制带随机指针的链表/0138-复制带随机指针的链表.py:11
Method
copyRandomList
(self, head: 'Node')
LeetCode-Python/剑指 Offer 35.复杂链表的复制/剑指 Offer 35-复杂链表的复制.py:10
Method
copyRandomList
:type head: Node :rtype: Node
面试题35.复杂链表的复制/面试题35-复杂链表的复制.py:10
Method
countAndSay
:type n: int :rtype: str
0038.报数/0038-报数.py:2
Method
countAndSay
0038.报数/0038-报数.cpp:3
Method
countAsterisks
(self, s: str)
2315.统计星号/2315-统计星号.py:2
Method
countAsterisks
(self, s: str)
LeetCode-Python/2315.统计星号/2315-统计星号.py:2
Method
countBattleships
:type board: List[List[str]] :rtype: int
0419.甲板上的战舰/0419-甲板上的战舰.py:2
Method
countBits
(int num)
0338.比特位计数/0338-比特位计数.java:2
Method
countCharacters
:type words: List[str] :type chars: str :rtype: int
1160.拼写单词/1160-拼写单词.py:2
Method
countCompleteComponents
(self, n: int, edges: List[List[int]])
2685.统计完全连通分量的数量/2685-统计完全连通分量的数量.py:2
Method
countCompleteComponents
(self, n: int, edges: List[List[int]])
LeetCode-Python/2685.统计完全连通分量的数量/2685-统计完全连通分量的数量.py:2
Method
countComponents
:type n: int :type edges: List[List[int]] :rtype: int
0323.无向图中连通分量的数目/0323-无向图中连通分量的数目.py:35
Method
countGoodStrings
(self, low: int, high: int, zero: int, one: int)
2466.统计构造好字符串的方案数/2466-统计构造好字符串的方案数.py:2
Method
countGoodStrings
(self, low: int, high: int, zero: int, one: int)
LeetCode-Python/2466.统计构造好字符串的方案数/2466-统计构造好字符串的方案数.py:2
Method
countGoodTriplets
:type arr: List[int] :type a: int :type b: int :type c: int :rtype: int
1534.统计好三元组/1534-统计好三元组.py:2
Method
countLetters
:type S: str :rtype: int
1180.统计只含单一字母的子串/1180-统计只含单一字母的子串 2.py:2
Method
countLetters
:type S: str :rtype: int
1180.统计只含单一字母的子串/1180-统计只含单一字母的子串.py:2
Method
countLetters
(self, s: str)
LeetCode-Python/1180.统计只含单一字母的子串/1180-统计只含单一字母的子串.py:2
Method
countLiveCells
(x0, y0)
0289.生命游戏/0289-生命游戏 2.py:13
Method
countLiveCells
(x0, y0)
0289.生命游戏/0289-生命游戏.py:13
Method
countMatches
(self, items: List[List[str]], ruleKey: str, ruleValue: str)
1773.统计匹配检索规则的物品数量/1773-统计匹配检索规则的物品数量.py:2
Method
countMatches
(self, items: List[List[str]], ruleKey: str, ruleValue: str)
LeetCode-Python/1773.统计匹配检索规则的物品数量/1773-统计匹配检索规则的物品数量.py:2
Method
countNegatives
(self, grid: List[List[int]])
LeetCode-Python/1351.统计有序矩阵中的负数/1351-统计有序矩阵中的负数.py:2
Method
countNegatives
:type grid: List[List[int]] :rtype: int
1351.统计有序矩阵中的负数/1351-统计有序矩阵中的负数.py:2
Method
countNegatives
:type grid: List[List[int]] :rtype: int
1351.统计有序矩阵中的负数/1351-统计有序矩阵中的负数 2.py:2
Method
countNodes
:type root: TreeNode :rtype: int
0222.完全二叉树的节点个数/0222-完全二叉树的节点个数 2.py:9
Method
countNodes
:type root: TreeNode :rtype: int
0222.完全二叉树的节点个数/0222-完全二叉树的节点个数.py:9
Method
countNodes
(self, root: Optional[TreeNode])
LeetCode-Python/0222.完全二叉树的节点个数/0222-完全二叉树的节点个数.py:8
Method
countOdds
:type low: int :type high: int :rtype: int
1523.在区间范围内统计奇数数目/1523-在区间范围内统计奇数数目.py:2
Method
countOperations
(self, num1: int, num2: int)
2169.得到0的操作数/2169-得到0的操作数.py:2
Method
countOperations
(self, num1: int, num2: int)
LeetCode-Python/2169.得到0的操作数/2169-得到0的操作数.py:2
Method
countPoints
(self, rings: str)
2103.环和杆/2103-环和杆.py:2
Method
countPoints
(self, rings: str)
LeetCode-Python/2103.环和杆/2103-环和杆.py:2
Method
countPrefixes
(self, words: List[str], s: str)
2255.统计是给定字符串前缀的字符串数目/2255-统计是给定字符串前缀的字符串数目.py:2
Method
countPrefixes
(self, words: List[str], s: str)
LeetCode-Python/2255.统计是给定字符串前缀的字符串数目/2255-统计是给定字符串前缀的字符串数目.py:2
Method
countPrimeSetBits
:type L: int :type R: int :rtype: int
0762.二进制表示中质数个计算置位/0762-二进制表示中质数个计算置位.py:2
Method
countPrimes
:type n: int :rtype: int
0204.计数质数/0204-计数质数.py:2
Method
countSegments
:type s: str :rtype: int
0434.字符串中的单词数/0434-字符串中的单词数.py:2
Method
countSeniors
(self, details: List[str])
2678.老人的数目/2678-老人的数目.py:2
Method
countSeniors
(self, details: List[str])
LeetCode-Python/2678.老人的数目/2678-老人的数目.py:2
Method
countServers
:type grid: List[List[int]] :rtype: int
1267.统计参与通信的服务器/1267-统计参与通信的服务器.py:2
Method
countSmaller
:type nums: List[int] :rtype: List[int]
0315.计算右侧小于当前元素的个数/0315-计算右侧小于当前元素的个数.py:9
Method
countSquares
:type matrix: List[List[int]] :rtype: int
1277.统计全为1的正方形子矩阵/1277-统计全为1的正方形子矩阵.py:2
Method
countStudents
(self, students: List[int], sandwiches: List[int])
LeetCode-Python/1700.无法吃午餐的学生数量/1700-无法吃午餐的学生数量.py:2
Method
countStudents
(self, students: List[int], sandwiches: List[int])
1700.无法吃午餐的学生数量/1700-无法吃午餐的学生数量.py:2
Method
countSubTrees
:type n: int :type edges: List[List[int]] :type labels: str :rtype: List[int]
1519.子树中标签相同的节点数/1519-子树中标签相同的节点数.py:2
Method
countSubstrings
:type s: str :rtype: int
0647.回文子串/0647-回文子串.py:2
Method
countTriplets
:type arr: List[int] :rtype: int
1442.形成两个异或相等数组的三元组数目/1442-形成两个异或相等数组的三元组数目.py:2
Method
create
:type path: str :type value: int :rtype: bool
1166.设计文件系统/1166-设计文件系统.py:6
Method
createTargetArray
:type nums: List[int] :type index: List[int] :rtype: List[int]
1389.按既定顺序创建目标数组/1389-按既定顺序创建目标数组.py:2
Method
createTargetArray
:type nums: List[int] :type index: List[int] :rtype: List[int]
1389.按既定顺序创建目标数组/1389-按既定顺序创建目标数组 2.py:2
Method
createTargetArray
(self, nums: List[int], index: List[int])
LeetCode-Python/1389.按既定顺序创建目标数组/1389-按既定顺序创建目标数组.py:2
Method
criticalConnections
:type n: int :type connections: List[List[int]] :rtype: List[List[int]]
1192.查找集群内的「关键连接」/1192-查找集群内的「关键连接」.py:3
Method
customSortString
:type S: str :type T: str :rtype: str
0791.自定义字符串排序/0791-自定义字符串排序.py:2
Method
dailyTemperatures
:type T: List[int] :rtype: List[int]
0739.每日温度/0739-每日温度.py:2
Method
dailyTemperatures
(self, temperatures: List[int])
剑指 Offer II 038.每日温度/剑指 Offer II 038-每日温度.py:2
Method
dailyTemperatures
(self, temperatures: List[int])
LeetCode-Python/剑指 Offer II 038.每日温度/剑指 Offer II 038-每日温度.py:2
Method
dayOfYear
:type date: str :rtype: int
1154.一年中的第几天/1154-一年中的第几天.py:2
Method
deQueue
Delete an element from the circular queue. Return true if the operation is successful. :rtype: bool
0622.设计循环队列/0622-设计循环队列.py:30
Method
death
:type name: str :rtype: None
1600.皇位继承顺序/1600-皇位继承顺序.py:20
Method
decode
Decodes a shortened URL to its original URL. :type shortUrl: str :rtype: str
0535.TinyURL的加密与解密/0535-TinyURL的加密与解密.py:11
← previous
next →
401–500 of 2,012, ranked by callers