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
buildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树.py:9
Method
buildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树 2.py:9
Method
buildTree
(self, inorder: List[int], postorder: List[int])
LeetCode-Python/0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树.py:8
Method
buildTree
(self, preorder: List[int], inorder: List[int])
LeetCode-Python/0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树.py:8
Method
busyStudent
:type startTime: List[int] :type endTime: List[int] :type queryTime: int :rtype: int
1450.在既定时间做作业的学生人数/1450-在既定时间做作业的学生人数.py:2
Method
buyChoco
(self, prices: List[int], money: int)
2706.购买两块巧克力/2706-购买两块巧克力.py:2
Method
buyChoco
(self, prices: List[int], money: int)
LeetCode-Python/2706.购买两块巧克力/2706-购买两块巧克力.py:2
Method
calPoints
:type ops: List[str] :rtype: int
0682.棒球比赛/0682-棒球比赛.py:2
Method
calPoints
:type ops: List[str] :rtype: int
0682.棒球比赛/0682-棒球比赛 2.py:2
Method
calPoints
(self, operations: List[str])
LeetCode-Python/0682.棒球比赛/0682-棒球比赛.py:2
Method
calcEquation
:type equations: List[List[str]] :type values: List[float] :type queries: List[List[str]] :rtype: List[float]
0399.除法求值/0399-除法求值.py:2
Method
calculate
:type s: str :rtype: int
0227.基本计算器II/0227-基本计算器II.py:3
Method
calculate
(self, s: str)
LCP 17.速算机器人/LCP 17-速算机器人.py:2
Method
calculate
(self, s: str)
LeetCode-Python/LCP 17.速算机器人/LCP 17-速算机器人.py:2
Method
calculateMinimumHP
:type dungeon: List[List[int]] :rtype: int
0174.地下城游戏/0174-地下城游戏.py:2
Method
calculateTime
:type keyboard: str :type word: str :rtype: int
1165.单行键盘/1165-单行键盘 2.py:2
Method
calculateTime
:type keyboard: str :type word: str :rtype: int
1165.单行键盘/1165-单行键盘.py:2
Method
calculateTime
(self, keyboard: str, word: str)
LeetCode-Python/1165.单行键盘/1165-单行键盘.py:2
Method
camelMatch
:type queries: List[str] :type pattern: str :rtype: List[bool]
1023.驼峰式匹配/1023-驼峰式匹配.py:2
Method
canArrange
:type arr: List[int] :type k: int :rtype: bool
1497.检查数组对是否可以被k整除/1497-检查数组对是否可以被k整除.py:2
Method
canAttendMeetings
:type intervals: List[List[int]] :rtype: bool
0252.会议室/0252-会议室.py:2
Method
canBeEqual
:type target: List[int] :type arr: List[int] :rtype: bool
1460.通过翻转子数组使两个数组相等/1460-通过翻转子数组使两个数组相等.py:2
Method
canCompleteCircuit
:type gas: List[int] :type cost: List[int] :rtype: int
0134.加油站/0134-加油站.py:2
Method
canConstruct
(self, ransomNote: str, magazine: str)
LeetCode-Python/0383.赎金信/0383-赎金信.py:2
Method
canConstruct
:type ransomNote: str :type magazine: str :rtype: bool
0383.赎金信/0383-赎金信 2.py:2
Method
canConstruct
:type ransomNote: str :type magazine: str :rtype: bool
0383.赎金信/0383-赎金信.py:2
Method
canConvert
:type str1: str :type str2: str :rtype: bool
1153.字符串转化/1153-字符串转化.py:2
Method
canConvertString
:type s: str :type t: str :type k: int :rtype: bool
1540.K次操作转变字符串/1540-K次操作转变字符串.py:2
Method
canDivideIntoSubsequences
:type nums: List[int] :type K: int :rtype: bool
1121.将数组分成几个递增序列/1121-将数组分成几个递增序列.py:2
Method
canFinish
(self, numCourses: int, prerequisites: List[List[int]])
0207.课程表/0207-课程表.py:2
Method
canJump
:type nums: List[int] :rtype: bool
0055.跳跃游戏/0055-跳跃游戏.py:2
Method
canJump
:type nums: List[int] :rtype: bool
0055.跳跃游戏/0055-跳跃游戏 2.py:2
Method
canJump
(self, nums: List[int])
LeetCode-Python/0055.跳跃游戏/0055-跳跃游戏.py:2
Method
canMeasureWater
:type x: int :type y: int :type z: int :rtype: bool
0365.水壶问题/0365-水壶问题.py:2
Method
canPermutePalindrome
:type s: str :rtype: bool
0266.回文排列/0266-回文排列.py:2
Method
canPermutePalindrome
(self, s: str)
面试题 01.04.回文排列/面试题 01.04-回文排列.py:2
Method
canPermutePalindrome
(self, s: str)
LeetCode-Python/面试题 01.04.回文排列/面试题 01.04-回文排列.py:2
Method
canThreePartsEqualSum
:type A: List[int] :rtype: bool
1013.将数组分成和相等的三个部分/1013-将数组分成和相等的三个部分.py:2
Method
canVisitAllRooms
:type rooms: List[List[int]] :rtype: bool
0841.钥匙和房间/0841-钥匙和房间.py:2
Method
canWin
:type s: str :rtype: bool
0294.翻转游戏II/0294-翻转游戏II.py:2
Method
canWinNim
:type n: int :rtype: bool
0292.Nim游戏/0292-Nim游戏.py:2
Method
canWinNim
:type n: int :rtype: bool
0292.Nim游戏/0292-Nim游戏 2.py:2
Method
canWinNim
(self, n: int)
LeetCode-Python/0292.Nim游戏/0292-Nim游戏.py:2
Method
candyCrush
:type board: List[List[int]] :rtype: List[List[int]]
0723.粉碎糖果/0723-粉碎糖果.py:2
Method
carPooling
:type trips: List[List[int]] :type capacity: int :rtype: bool
1094.拼车/1094-拼车.py:2
Method
cellsInRange
(self, s: str)
LeetCode-Python/2194.Excel表中某个范围内的单元格/2194-Excel表中某个范围内的单元格.py:2
Method
cellsInRange
(self, s: str)
2194.Excel表中某个范围内的单元格/2194-Excel表中某个范围内的单元格.py:2
Method
change
(node)
0099.恢复二叉搜索树/0099-恢复二叉搜索树.py:23
Method
check
(root1, root2)
面试题28.对称的二叉树/面试题28-对称的二叉树.py:17
Method
check
Check if a number is available or not. :type number: int :rtype: bool
0379.电话目录/0379-电话目录.py:24
Method
check
()
1275.找出井字棋的获胜者/1275-找出井字棋的获胜者.py:8
Method
check
(x0, y0)
0531.孤独像素I/0531-孤独像素I.py:12
Method
checkDistances
(self, s: str, distance: List[int])
2399.检查相同字母间的距离/2399-检查相同字母间的距离.py:2
Method
checkDistances
(self, s: str, distance: List[int])
LeetCode-Python/2399.检查相同字母间的距离/2399-检查相同字母间的距离.py:2
Method
checkIfCanBreak
:type s1: str :type s2: str :rtype: bool
1433.检查一个字符串是否可以打破另一个字符串/1433-检查一个字符串是否可以打破另一个字符串.py:2
Method
checkIfExist
:type arr: List[int] :rtype: bool
1346.检查整数及其两倍数是否存在/1346-检查整数及其两倍数是否存在.py:2
Method
checkIfPangram
(self, sentence: str)
LeetCode-Python/1832.判断句子是否为全字母句/1832-判断句子是否为全字母句.py:2
Method
checkIfPangram
:type sentence: str :rtype: bool
1832.判断句子是否为全字母句/1832-判断句子是否为全字母句.py:2
Method
checkIfPangram
:type sentence: str :rtype: bool
1832.判断句子是否为全字母句/1832-判断句子是否为全字母句 2.py:2
Method
checkIfPrerequisite
:type n: int :type prerequisites: List[List[int]] :type queries: List[List[int]] :rtype: List[bool]
1462.课程安排IV/1462-课程安排IV.py:2
Method
checkIn
:type id: int :type stationName: str :type t: int :rtype: None
1396.设计地铁系统/1396-设计地铁系统.py:6
Method
checkNeibor
(x, y)
1034.边框着色/1034-边框着色.py:27
Method
checkOut
:type id: int :type stationName: str :type t: int :rtype: None
1396.设计地铁系统/1396-设计地铁系统.py:16
Method
checkPerfectNumber
:type num: int :rtype: bool
0507.完美数/0507-完美数.py:2
Method
checkRecord
:type s: str :rtype: bool
0551.学生出勤记录I/0551-学生出勤记录I.py:2
Method
checkStraightLine
:type coordinates: List[List[int]] :rtype: bool
1232.缀点成线/1232-缀点成线.py:2
Method
checkTree
(self, root: Optional[TreeNode])
2236.判断根结点是否等于子结点之和/2236-判断根结点是否等于子结点之和.py:8
Method
checkTree
(self, root: Optional[TreeNode])
LeetCode-Python/2236.判断根结点是否等于子结点之和/2236-判断根结点是否等于子结点之和.py:8
Method
checkXMatrix
(self, grid: List[List[int]])
LeetCode-Python/2319.判断矩阵是否是一个X矩阵/2319-判断矩阵是否是一个X矩阵.py:2
Method
checkXMatrix
(self, grid: List[List[int]])
2319.判断矩阵是否是一个X矩阵/2319-判断矩阵是否是一个X矩阵.py:2
Method
circularGameLosers
(self, n: int, k: int)
2682.找出转圈游戏输家/2682-找出转圈游戏输家.py:2
Method
circularGameLosers
(self, n: int, k: int)
LeetCode-Python/2682.找出转圈游戏输家/2682-找出转圈游戏输家.py:2
Method
climbStairs
:type n: int :rtype: int
0070.爬楼梯/0070-爬楼梯 2.py:2
Method
climbStairs
:type n: int :rtype: int
0070.爬楼梯/0070-爬楼梯.py:2
Method
climbStairs
(self, n: int)
LeetCode-Python/0070.爬楼梯/0070-爬楼梯.py:2
Method
cloneGraph
:type node: Node :rtype: Node
0133.克隆图/0133-克隆图 2.py:2
Method
cloneGraph
:type node: Node :rtype: Node
0133.克隆图/0133-克隆图.py:2
Method
cloneGraph
(self, node: 'Node')
LeetCode-Python/0133.克隆图/0133-克隆图.py:11
Method
closedIsland
:type grid: List[List[int]] :rtype: int
1254.统计封闭岛屿的数目/1254-统计封闭岛屿的数目.py:2
Method
closestKValues
:type root: TreeNode :type target: float :type k: int :rtype: List[int]
0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II.py:9
Method
closestKValues
:type root: TreeNode :type target: float :type k: int :rtype: List[int]
0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II 2.py:9
Method
closestKValues
(self, root: Optional[TreeNode], target: float, k: int)
LeetCode-Python/0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II.py:9
Method
closestValue
:type root: TreeNode :type target: float :rtype: int
0270.最接近的二叉搜索树值/0270-最接近的二叉搜索树值.py:9
Method
clumsy
:type N: int :rtype: int
1006.笨阶乘/1006-笨阶乘.py:3
Function
cmp
0452.用最少数量的箭引爆气球/0452-用最少数量的箭引爆气球.cpp:6
Function
cmp
* Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * };
0023.合并K个排序链表/0023-合并K个排序链表.cpp:9
Method
cnt_node_in_subtree
(node)
1145.二叉树着色游戏/1145-二叉树着色游戏.py:28
Method
coinChange
:type coins: List[int] :type amount: int :rtype: int
0322.零钱兑换/0322-零钱兑换.py:2
Method
colorBorder
:type grid: List[List[int]] :type r0: int :type c0: int :type color: int :rtype: List[List[int]]
1034.边框着色/1034-边框着色.py:2
Method
combinationSum
:type candidates: List[int] :type target: int :rtype: List[List[int]]
0039.组合总和/0039-组合总和.py:2
Method
combinationSum2
:type candidates: List[int] :type target: int :rtype: List[List[int]]
0040.组合总和II/0040-组合总和II.py:2
Method
combinationSum3
:type k: int :type n: int :rtype: List[List[int]]
0216.组合总和III/0216-组合总和III.py:2
Method
combinationSum4
:type nums: List[int] :type target: int :rtype: int
0377.组合总和Ⅳ/0377-组合总和Ⅳ.py:2
Method
combine
:type n: int :type k: int :rtype: List[List[int]]
0077.组合/0077-组合.py:2
Method
commonChars
:type A: List[str] :rtype: List[str]
1002.查找常用字符/1002-查找常用字符.py:2
Method
compareVersion
:type version1: str :type version2: str :rtype: int
0165.比较版本号/0165-比较版本号.py:2
Method
complexNumberMultiply
:type a: str :type b: str :rtype: str
0537.复数乘法/0537-复数乘法.py:2
Method
compressString
(self, S: str)
面试题 01.06.字符串压缩/面试题 01.06-字符串压缩.py:2
Method
compressString
:type S: str :rtype: str
面试题01.06.字符串压缩/面试题01.06-字符串压缩.py:2
Method
compressString
(self, S: str)
LeetCode-Python/面试题 01.06.字符串压缩/面试题 01.06-字符串压缩.py:2
← previous
next →
301–400 of 2,012, ranked by callers