Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HuberTRoy/leetCode
/ functions
Functions
332 in github.com/HuberTRoy/leetCode
⨍
Functions
332
◇
Types & classes
177
Method
largestNumber
:type nums: List[int] :rtype: str
Array/LargestNumber.py:50
Method
left
(x, y)
Array/SpiralMatrixII.py:80
Method
lengthOfLIS
:type nums: List[int] :rtype: int
DP/longesSubsequence.py:36
Method
lengthOfLastWord
:type s: str :rtype: int
String/LengthOfLastWord.py:14
Method
lengthOfLongestSubstring
:type s: str :rtype: int
String/LongesSubstrings.py:28
Method
letterCombinations
:type digits: str :rtype: List[str]
String/LetterCombinationsOfAPhoneNumber.py:36
Method
levelOrder
:type root: TreeNode :rtype: List[List[int]]
BFS/BinaryTreeLevelOrderTraversal.py:43
Method
levelOrderBottom
:type root: TreeNode :rtype: List[List[int]]
BFS/BinaryTreeLevelOrderTraversalII.py:38
Method
longestCommonPrefix
:type strs: List[str] :rtype: str
String/LongestCommonPrefix.py:34
Method
longestConsecutive
:type nums: List[int] :rtype: int
Array/LongestConsecutiveSequence.py:105
Method
lowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
Tree/LowestCommonAncestorOfABinarySearchTree.py:58
Method
lowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
Tree/LowestCommonAncestorOfABinaryTree.py:66
Method
make
(preorder, inorder)
Tree/ConstructBinaryTreeFromPreorderAndInorderTraversal.py:51
Method
makeBSTByInorder
(size)
Tree/ConvertSortedListToBinarySearchTree.py:128
Method
makeBinarySearchTree
(nums)
Tree/ConvertSortedArrayToBinarySearchTree.py:62
Method
makeEqual
(s, length=max_nums)
Array/LargestNumber.py:69
Method
makeSubsets
(index, current_subsets)
Backtracking/subsets.py:41
Method
makeTree
(inorder, postorder)
Tree/ConstructBinaryTreeFromInorderAndPostorderTraversal.py:72
Function
makeValueInList
(value)
Sorted/sotred.py:95
Method
makeXY
(x, y)
Array/SpiralMatrixII.py:36
Method
maxArea
:type height: List[int] :rtype: int
Array/ContainerWithMostWater.py:141
Method
maxAreaOfIsland
:type grid: List[List[str]] :rtype: int
Array/MaxAreaOfIsland.py:38
Method
maxDepth
(self, root: TreeNode)
BFS/MaximumDepthOfBinaryTree.py:33
Method
maxDistToClosest
:type seats: List[int] :rtype: int
Array/MaximizeDistanceToClosestPerson.py:45
Method
maxIncreaseKeepingSkyline
:type grid: List[List[int]] :rtype: int
Array/max_increase_to_keep_city_skyline.py:33
Method
maxPathSum
:type root: TreeNode :rtype: int
Tree/BinaryTreeMaximumPathSum.py:135
Method
maxProduct
:type nums: List[int] :rtype: int
Array/MaximumProductSubarray.py:49
Method
maxProfit
:type prices: List[int] :rtype: int
Array/BestTimeToBuyAndSellStockI_II.py:67
Method
maxSlidingWindow
:type nums: List[int] :type k: int :rtype: List[int]
Array/SlidingWindowMaximum.py:62
Method
maxSubArray
:type nums: List[int] :rtype: int
Array/MaximumSubarray.py:37
Method
maxSubarraySumCircular
:type A: List[int] :rtype: int
Array/MaximumSumCircularSubarray.py:62
Method
merge
:type intervals: List[Interval] :rtype: List[Interval]
Array/MergeArray.py:29
Method
merge
:type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: void Do not return anything,
Array/MergeSortedArray.py:122
Function
mergeKLists
(lists)
Heap/MergeKSortedLists.js:14
Method
mergeKLists
:type lists: List[ListNode] :rtype: ListNode
Heap/MergeKSortedLists.py:34
Function
mergeSort
(shuffledList)
Sorted/sotred.py:111
Method
mergeSort
归并排序的基本思路是分治,把一个大问题分解成小问题。逐个解决小问题。 以长度的一半为基准点,将一个大列表分为两个小列表,一直分一直分,然后合并。 所以排序分为两步: 第一步是分解,第二步是合并。
Array/KthLargestElementInAnArray.py:86
Method
mergeTwoLists
:type l1: ListNode :type l2: ListNode :rtype: ListNode
Array/MergerTwoSortedList.py:21
Method
merge_sort
(l, r)
Sorted/SortList.py:131
Method
minAddToMakeValid
:type S: str :rtype: int
String/MinimumAddToMakeParenthesesValid.py:46
Function
minCostClimbingStairs
(cost)
DP/MinCostClimbingStairs.js:33
Method
minFallingPathSum
:type A: List[List[int]] :rtype: int
Array/MinimumFallingPathSum.py:39
Method
minFlipsMonoIncr
:type S: str :rtype: int
DP/FlipStringToMonotoneIncreasing.py:47
Method
minPathSum
:type grid: List[List[int]] :rtype: int
Array/MinimumPathSum.py:45
Method
minWindow
:type s: str :type t: str :rtype: str
String/MinimumWindowSubstring.py:62
Method
minimumTotal
:type triangle: List[List[int]] :rtype: int
Array/Triangle.py:32
Method
missingNumber
:type nums: List[int] :rtype: int
Array/MissingNumber.py:38
Method
myAtoi
:type str: str :rtype: int
String/StringToInteger.py:68
Method
mySqrt
:type x: int :rtype: int
Number/Sqrt(x).py:29
Method
mycmp
(x, y)
Array/LargestNumber.py:62
Method
next
:type n: int :rtype: int
Design/RLEIterator.py:62
Method
numDecodings
:type s: str :rtype: int
DP/DecodeWays.py:55
Method
numIslands
:type grid: List[List[str]] :rtype: int
Array/NumberOfIslands.py:39
Method
numJewelsInStones
:type J: str :type S: str :rtype: int
String/JewelsAndStones.py:26
Method
numSubarrayProductLessThanK
:type nums: List[int] :type k: int :rtype: int
DP/SubarrayProductLessThanK.py:27
Method
numSubarraysWithSum
:type A: List[int] :type S: int :rtype: int
Array/BinarySubarraysWithSum.py:31
Method
numUniqueEmails
:type emails: List[str] :rtype: int
String/UniqueEmailAddresses.py:41
Method
oddEvenList
:type head: ListNode :rtype: ListNode
Array/OddEvenLinkedList.py:45
Method
partition
:type head: ListNode :type x: int :rtype: ListNode
Array/PartitionList.py:26
Method
partitionDisjoint
:type A: List[int] :rtype: int
Array/PartitionArrayIntoDisjointIntervals.py:59
Method
pathSum
:type root: TreeNode :type sum: int :rtype: List[List[int]]
Tree/PathSumII.py:38
Method
peek
(self)
Stack/ImplementQueueUsingStack.py:60
Method
plusOne
:type digits: List[int] :rtype: List[int]
Array/PlusOne.py:29
Method
pop
(self)
Stack/GetMinStack.py:75
Method
prevPrint
(self)
Tree/BinarySearchTree.py:84
Method
productExceptSelf
:type nums: List[int] :rtype: List[int]
Array/ProductOfArrayExceptSelf.py:44
Method
push
(self, value)
Stack/GetMinStack.py:65
Method
put
:type key: int :type value: int :rtype: void
Design/LRUCache.py:92
Method
reduce_abc
(strs, currentStr="")
String/LetterCombinationsOfAPhoneNumber.py:54
Method
removeDuplicates
:type nums: List[int] :rtype: int
Array/RemoveDuplicatesFromSortedArray.py:50
Method
removeDuplicates
:type nums: List[int] :rtype: int
Array/RemoveDuplicatesFromSortedArrayII.py:46
Method
removeElements
:type head: ListNode :type val: int :rtype: ListNode
Array/RemoveLinkedListElements.py:27
Method
removeNthFromEnd
:type head: ListNode :type n: int :rtype: ListNode
Array/RemoveNthNodeFromEndOfList.py:64
Method
replaceWords
:type dict: List[str] :type sentence: str :rtype: str
String/ReplaceWords.py:57
Method
reset
Resets the array to its original configuration and return it. :rtype: List[int]
Array/ShuffleAnArray.py:47
Function
reverseKGroup
(head, k)
Array/ReverseNodesInk-Group.js:21
Function
reverseList
(head)
Array/ReverseLinkedList.js:19
Method
reversePairs
:type nums: List[int] :rtype: int
DP/ReversePairs.py:44
Method
reverseString
:type s: str :rtype: str
String/ReverseString.py:28
Method
right
(x, y)
Array/SpiralMatrixII.py:46
Method
rightSideView
:type root: TreeNode :rtype: List[int]
Tree/BinaryTreeRightSideView.py:34
Method
rob
:type nums: List[int] :rtype: int
DP/HouseRobber.py:52
Method
rob
:type nums: List[int] :rtype: int
DP/HouseRobberII.py:45
Method
rotateRight
:type head: ListNode :type k: int :rtype: ListNode
Array/RotateList.py:51
Method
search
Returns if the word is in the trie. :type word: str :rtype: bool
Tree/Trie.py:65
Method
search
:type nums: List[int] :type target: int :rtype: int
Array/SearchInRotatedSortedArrayII.py:82
Method
search
:type nums: List[int] :type target: int :rtype: int
Array/SearchInRotatedSortedArray.py:94
Method
searchMatrix
:type matrix: List[List[int]] :type target: int :rtype: bool
Array/Search2DMatrix.py:104
Method
searchMatrix
(self, matrix, target)
Array/Search2DMatrixII.py:100
Method
searchRange
:type nums: List[int] :type target: int :rtype: List[int]
Array/FindFirstAndLastPositionOfElementInSortedArray.py:113
Function
selectionSort
(shuffledList)
Sorted/sotred.py:26
Method
serialize
Encodes a tree to a single string. :type root: TreeNode :rtype: str
Tree/SerializeAndDeserializeBinaryTree.py:131
Method
setZeroes
:type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead.
Array/SetMatrixZeroes.py:69
Method
shiftingLetters
:type S: str :type shifts: List[int] :rtype: str
String/ShiftingLetters.py:43
Method
shuffle
Returns a random shuffling of the array. :rtype: List[int]
Array/ShuffleAnArray.py:54
Method
simplifyPath
:type path: str :rtype: str
String/SimplifyPath.py:37
Method
singleNumber
:type nums: List[int] :rtype: int
Array/SingleNumber.py:33
Method
solve
:type board: List[List[str]] :rtype: void Do not return anything, modify board in-place instead.
Array/SurroundedRegions.py:68
Method
sortArrayByParity
:type A: List[int] :rtype: List[int]
Array/SortArrayByParity.py:31
Method
sortArrayByParityII
:type A: List[int] :rtype: List[int]
Array/SortArrayByParityII.py:27
← previous
next →
201–300 of 332, ranked by callers