MCPcopy Create free account

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

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

MethodbuildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树.py:9
MethodbuildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树 2.py:9
MethodbuildTree
(self, inorder: List[int], postorder: List[int])
LeetCode-Python/0106.从中序与后序遍历序列构造二叉树/0106-从中序与后序遍历序列构造二叉树.py:8
MethodbuildTree
(self, preorder: List[int], inorder: List[int])
LeetCode-Python/0105.从前序与中序遍历序列构造二叉树/0105-从前序与中序遍历序列构造二叉树.py:8
MethodbusyStudent
:type startTime: List[int] :type endTime: List[int] :type queryTime: int :rtype: int
1450.在既定时间做作业的学生人数/1450-在既定时间做作业的学生人数.py:2
MethodbuyChoco
(self, prices: List[int], money: int)
2706.购买两块巧克力/2706-购买两块巧克力.py:2
MethodbuyChoco
(self, prices: List[int], money: int)
LeetCode-Python/2706.购买两块巧克力/2706-购买两块巧克力.py:2
MethodcalPoints
:type ops: List[str] :rtype: int
0682.棒球比赛/0682-棒球比赛.py:2
MethodcalPoints
:type ops: List[str] :rtype: int
0682.棒球比赛/0682-棒球比赛 2.py:2
MethodcalPoints
(self, operations: List[str])
LeetCode-Python/0682.棒球比赛/0682-棒球比赛.py:2
MethodcalcEquation
:type equations: List[List[str]] :type values: List[float] :type queries: List[List[str]] :rtype: List[float]
0399.除法求值/0399-除法求值.py:2
Methodcalculate
:type s: str :rtype: int
0227.基本计算器II/0227-基本计算器II.py:3
Methodcalculate
(self, s: str)
LCP 17.速算机器人/LCP 17-速算机器人.py:2
Methodcalculate
(self, s: str)
LeetCode-Python/LCP 17.速算机器人/LCP 17-速算机器人.py:2
MethodcalculateMinimumHP
:type dungeon: List[List[int]] :rtype: int
0174.地下城游戏/0174-地下城游戏.py:2
MethodcalculateTime
:type keyboard: str :type word: str :rtype: int
1165.单行键盘/1165-单行键盘 2.py:2
MethodcalculateTime
:type keyboard: str :type word: str :rtype: int
1165.单行键盘/1165-单行键盘.py:2
MethodcalculateTime
(self, keyboard: str, word: str)
LeetCode-Python/1165.单行键盘/1165-单行键盘.py:2
MethodcamelMatch
:type queries: List[str] :type pattern: str :rtype: List[bool]
1023.驼峰式匹配/1023-驼峰式匹配.py:2
MethodcanArrange
:type arr: List[int] :type k: int :rtype: bool
1497.检查数组对是否可以被k整除/1497-检查数组对是否可以被k整除.py:2
MethodcanAttendMeetings
:type intervals: List[List[int]] :rtype: bool
0252.会议室/0252-会议室.py:2
MethodcanBeEqual
:type target: List[int] :type arr: List[int] :rtype: bool
1460.通过翻转子数组使两个数组相等/1460-通过翻转子数组使两个数组相等.py:2
MethodcanCompleteCircuit
:type gas: List[int] :type cost: List[int] :rtype: int
0134.加油站/0134-加油站.py:2
MethodcanConstruct
(self, ransomNote: str, magazine: str)
LeetCode-Python/0383.赎金信/0383-赎金信.py:2
MethodcanConstruct
:type ransomNote: str :type magazine: str :rtype: bool
0383.赎金信/0383-赎金信 2.py:2
MethodcanConstruct
:type ransomNote: str :type magazine: str :rtype: bool
0383.赎金信/0383-赎金信.py:2
MethodcanConvert
:type str1: str :type str2: str :rtype: bool
1153.字符串转化/1153-字符串转化.py:2
MethodcanConvertString
:type s: str :type t: str :type k: int :rtype: bool
1540.K次操作转变字符串/1540-K次操作转变字符串.py:2
MethodcanDivideIntoSubsequences
:type nums: List[int] :type K: int :rtype: bool
1121.将数组分成几个递增序列/1121-将数组分成几个递增序列.py:2
MethodcanFinish
(self, numCourses: int, prerequisites: List[List[int]])
0207.课程表/0207-课程表.py:2
MethodcanJump
:type nums: List[int] :rtype: bool
0055.跳跃游戏/0055-跳跃游戏.py:2
MethodcanJump
:type nums: List[int] :rtype: bool
0055.跳跃游戏/0055-跳跃游戏 2.py:2
MethodcanJump
(self, nums: List[int])
LeetCode-Python/0055.跳跃游戏/0055-跳跃游戏.py:2
MethodcanMeasureWater
:type x: int :type y: int :type z: int :rtype: bool
0365.水壶问题/0365-水壶问题.py:2
MethodcanPermutePalindrome
:type s: str :rtype: bool
0266.回文排列/0266-回文排列.py:2
MethodcanPermutePalindrome
(self, s: str)
面试题 01.04.回文排列/面试题 01.04-回文排列.py:2
MethodcanPermutePalindrome
(self, s: str)
LeetCode-Python/面试题 01.04.回文排列/面试题 01.04-回文排列.py:2
MethodcanThreePartsEqualSum
:type A: List[int] :rtype: bool
1013.将数组分成和相等的三个部分/1013-将数组分成和相等的三个部分.py:2
MethodcanVisitAllRooms
:type rooms: List[List[int]] :rtype: bool
0841.钥匙和房间/0841-钥匙和房间.py:2
MethodcanWin
:type s: str :rtype: bool
0294.翻转游戏II/0294-翻转游戏II.py:2
MethodcanWinNim
:type n: int :rtype: bool
0292.Nim游戏/0292-Nim游戏.py:2
MethodcanWinNim
:type n: int :rtype: bool
0292.Nim游戏/0292-Nim游戏 2.py:2
MethodcanWinNim
(self, n: int)
LeetCode-Python/0292.Nim游戏/0292-Nim游戏.py:2
MethodcandyCrush
:type board: List[List[int]] :rtype: List[List[int]]
0723.粉碎糖果/0723-粉碎糖果.py:2
MethodcarPooling
:type trips: List[List[int]] :type capacity: int :rtype: bool
1094.拼车/1094-拼车.py:2
MethodcellsInRange
(self, s: str)
LeetCode-Python/2194.Excel表中某个范围内的单元格/2194-Excel表中某个范围内的单元格.py:2
MethodcellsInRange
(self, s: str)
2194.Excel表中某个范围内的单元格/2194-Excel表中某个范围内的单元格.py:2
Methodchange
(node)
0099.恢复二叉搜索树/0099-恢复二叉搜索树.py:23
Methodcheck
(root1, root2)
面试题28.对称的二叉树/面试题28-对称的二叉树.py:17
Methodcheck
Check if a number is available or not. :type number: int :rtype: bool
0379.电话目录/0379-电话目录.py:24
Methodcheck
()
1275.找出井字棋的获胜者/1275-找出井字棋的获胜者.py:8
Methodcheck
(x0, y0)
0531.孤独像素I/0531-孤独像素I.py:12
MethodcheckDistances
(self, s: str, distance: List[int])
2399.检查相同字母间的距离/2399-检查相同字母间的距离.py:2
MethodcheckDistances
(self, s: str, distance: List[int])
LeetCode-Python/2399.检查相同字母间的距离/2399-检查相同字母间的距离.py:2
MethodcheckIfCanBreak
:type s1: str :type s2: str :rtype: bool
1433.检查一个字符串是否可以打破另一个字符串/1433-检查一个字符串是否可以打破另一个字符串.py:2
MethodcheckIfExist
:type arr: List[int] :rtype: bool
1346.检查整数及其两倍数是否存在/1346-检查整数及其两倍数是否存在.py:2
MethodcheckIfPangram
(self, sentence: str)
LeetCode-Python/1832.判断句子是否为全字母句/1832-判断句子是否为全字母句.py:2
MethodcheckIfPangram
:type sentence: str :rtype: bool
1832.判断句子是否为全字母句/1832-判断句子是否为全字母句.py:2
MethodcheckIfPangram
:type sentence: str :rtype: bool
1832.判断句子是否为全字母句/1832-判断句子是否为全字母句 2.py:2
MethodcheckIfPrerequisite
:type n: int :type prerequisites: List[List[int]] :type queries: List[List[int]] :rtype: List[bool]
1462.课程安排IV/1462-课程安排IV.py:2
MethodcheckIn
:type id: int :type stationName: str :type t: int :rtype: None
1396.设计地铁系统/1396-设计地铁系统.py:6
MethodcheckNeibor
(x, y)
1034.边框着色/1034-边框着色.py:27
MethodcheckOut
:type id: int :type stationName: str :type t: int :rtype: None
1396.设计地铁系统/1396-设计地铁系统.py:16
MethodcheckPerfectNumber
:type num: int :rtype: bool
0507.完美数/0507-完美数.py:2
MethodcheckRecord
:type s: str :rtype: bool
0551.学生出勤记录I/0551-学生出勤记录I.py:2
MethodcheckStraightLine
:type coordinates: List[List[int]] :rtype: bool
1232.缀点成线/1232-缀点成线.py:2
MethodcheckTree
(self, root: Optional[TreeNode])
2236.判断根结点是否等于子结点之和/2236-判断根结点是否等于子结点之和.py:8
MethodcheckTree
(self, root: Optional[TreeNode])
LeetCode-Python/2236.判断根结点是否等于子结点之和/2236-判断根结点是否等于子结点之和.py:8
MethodcheckXMatrix
(self, grid: List[List[int]])
LeetCode-Python/2319.判断矩阵是否是一个X矩阵/2319-判断矩阵是否是一个X矩阵.py:2
MethodcheckXMatrix
(self, grid: List[List[int]])
2319.判断矩阵是否是一个X矩阵/2319-判断矩阵是否是一个X矩阵.py:2
MethodcircularGameLosers
(self, n: int, k: int)
2682.找出转圈游戏输家/2682-找出转圈游戏输家.py:2
MethodcircularGameLosers
(self, n: int, k: int)
LeetCode-Python/2682.找出转圈游戏输家/2682-找出转圈游戏输家.py:2
MethodclimbStairs
:type n: int :rtype: int
0070.爬楼梯/0070-爬楼梯 2.py:2
MethodclimbStairs
:type n: int :rtype: int
0070.爬楼梯/0070-爬楼梯.py:2
MethodclimbStairs
(self, n: int)
LeetCode-Python/0070.爬楼梯/0070-爬楼梯.py:2
MethodcloneGraph
:type node: Node :rtype: Node
0133.克隆图/0133-克隆图 2.py:2
MethodcloneGraph
:type node: Node :rtype: Node
0133.克隆图/0133-克隆图.py:2
MethodcloneGraph
(self, node: 'Node')
LeetCode-Python/0133.克隆图/0133-克隆图.py:11
MethodclosedIsland
:type grid: List[List[int]] :rtype: int
1254.统计封闭岛屿的数目/1254-统计封闭岛屿的数目.py:2
MethodclosestKValues
:type root: TreeNode :type target: float :type k: int :rtype: List[int]
0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II.py:9
MethodclosestKValues
:type root: TreeNode :type target: float :type k: int :rtype: List[int]
0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II 2.py:9
MethodclosestKValues
(self, root: Optional[TreeNode], target: float, k: int)
LeetCode-Python/0272.最接近的二叉搜索树值II/0272-最接近的二叉搜索树值II.py:9
MethodclosestValue
:type root: TreeNode :type target: float :rtype: int
0270.最接近的二叉搜索树值/0270-最接近的二叉搜索树值.py:9
Methodclumsy
:type N: int :rtype: int
1006.笨阶乘/1006-笨阶乘.py:3
Functioncmp
0452.用最少数量的箭引爆气球/0452-用最少数量的箭引爆气球.cpp:6
Functioncmp
* Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * };
0023.合并K个排序链表/0023-合并K个排序链表.cpp:9
Methodcnt_node_in_subtree
(node)
1145.二叉树着色游戏/1145-二叉树着色游戏.py:28
MethodcoinChange
:type coins: List[int] :type amount: int :rtype: int
0322.零钱兑换/0322-零钱兑换.py:2
MethodcolorBorder
:type grid: List[List[int]] :type r0: int :type c0: int :type color: int :rtype: List[List[int]]
1034.边框着色/1034-边框着色.py:2
MethodcombinationSum
:type candidates: List[int] :type target: int :rtype: List[List[int]]
0039.组合总和/0039-组合总和.py:2
MethodcombinationSum2
:type candidates: List[int] :type target: int :rtype: List[List[int]]
0040.组合总和II/0040-组合总和II.py:2
MethodcombinationSum3
:type k: int :type n: int :rtype: List[List[int]]
0216.组合总和III/0216-组合总和III.py:2
MethodcombinationSum4
:type nums: List[int] :type target: int :rtype: int
0377.组合总和Ⅳ/0377-组合总和Ⅳ.py:2
Methodcombine
:type n: int :type k: int :rtype: List[List[int]]
0077.组合/0077-组合.py:2
MethodcommonChars
:type A: List[str] :rtype: List[str]
1002.查找常用字符/1002-查找常用字符.py:2
MethodcompareVersion
:type version1: str :type version2: str :rtype: int
0165.比较版本号/0165-比较版本号.py:2
MethodcomplexNumberMultiply
:type a: str :type b: str :rtype: str
0537.复数乘法/0537-复数乘法.py:2
MethodcompressString
(self, S: str)
面试题 01.06.字符串压缩/面试题 01.06-字符串压缩.py:2
MethodcompressString
:type S: str :rtype: str
面试题01.06.字符串压缩/面试题01.06-字符串压缩.py:2
MethodcompressString
(self, S: str)
LeetCode-Python/面试题 01.06.字符串压缩/面试题 01.06-字符串压缩.py:2
← previousnext →301–400 of 2,012, ranked by callers