MCPcopy Create free account

hub / github.com/HuberTRoy/leetCode / functions

Functions332 in github.com/HuberTRoy/leetCode

Method__init__
(self, root)
Tree/BinarySearchTree.py:29
Method__init__
(self)
Stack/GetMinStack.py:60
Method__init__
(self)
Stack/ImplementQueueUsingStack.py:38
Method__init__
(self, x)
Array/IntersectionOfTwoLinkedLists.py:86
Method__init__
:type nums: List[int]
Array/ShuffleAnArray.py:41
Method__init__
Initialize your data structure here.
Design/InsertDeleteGetRandomO(1).py:72
Method__init__
:type A: List[int]
Design/RLEIterator.py:56
Method__init__
:type capacity: int
Design/LRUCache.py:56
Method__repr__
(self)
Tree/serializeAndDeserialize.py:69
Method__repr__
(self)
Stack/GetMinStack.py:34
Method__str__
(self)
Tree/serializeAndDeserialize.py:65
Method_deserialize
(roots, nodes)
Tree/SerializeAndDeserializeBinaryTree.py:187
Method_generateParenthesis
(x, y, parenthesis)
Backtracking/GenerateParentheses.py:33
Method_serialize
(roots)
Tree/SerializeAndDeserializeBinaryTree.py:142
MethodaddNum
:type num: int :rtype: void
Heap/FindMedianFromDataStream.py:125
MethodaddTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
Array/AddTowNumbersII.py:59
MethodaddTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
Array/AddTwoNumbers.py:40
MethodbinarySearch2
(self, rawList, target)
Array/Search2DMatrixII.py:77
MethodbuildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
Tree/ConstructBinaryTreeFromPreorderAndInorderTraversal.py:44
MethodbuildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
Tree/ConstructBinaryTreeFromInorderAndPostorderTraversal.py:65
MethodcanCompleteCircuit
:type gas: List[int] :type cost: List[int] :rtype: int
Array/GasStation.py:69
MethodcanJump
:type nums: List[int] :rtype: bool
Array/JumpGame.py:37
MethodcheckInclusion
:type s1: str :type s2: str :rtype: bool
String/PermutationInString.py:29
FunctionclimbStairs
(n)
DP/ClimbingStairs.js:5
MethodclimbStairs
:type n: int :rtype: int
DP/ClimbingStairs.py:43
FunctioncombinationSum
(candidates, target)
DP/CombinationSum.js:43
Methodconnect
(self, root)
Tree/PopulatingNextRightPointersInEachNodeII.py:55
Methodconnect
(self, root)
Tree/PopulatingNextRightPointersInEachNode.py:61
Methodconstruct
(root, pre, post)
Tree/ConstructBinaryTreeFromPreorderAndPostorderTraversal.py:110
MethodconstructFromPrePost
:type pre: List[int] :type post: List[int] :rtype: TreeNode
Tree/ConstructBinaryTreeFromPreorderAndPostorderTraversal.py:71
MethodcountSegments
:type s: str :rtype: int
String/NumberOfSegmentsInString.py:27
MethodcountSmaller
:type nums: List[int] :rtype: List[int]
Array/CountOfSmallerNumbersAfterSelf.py:29
Methoddelete
(self)
Tree/BinarySearchTree.py:81
MethoddeleteDuplicates
:type head: ListNode :rtype: ListNode
Array/RemoveDuplicatesFromSortedListII.py:33
MethoddeleteDuplicates
:type head: ListNode :rtype: ListNode
Array/RemoveDuplicatesFromSortedList.py:34
Methoddeserialize
Decodes your encoded data to tree. :type data: str :rtype: TreeNode
Tree/SerializeAndDeserializeBinaryTree.py:169
MethoddetectCapitalUse
:type word: str :rtype: bool
String/DetectCapital.py:47
Methoddivide
:type dividend: int :type divisor: int :rtype: int
Number/DivideTwoIntegers.py:37
Methoddown
(x, y)
Array/SpiralMatrixII.py:63
Methodexist
:type board: List[List[str]] :type word: str :rtype: bool
DFS/WordSearch.py:193
MethodfairCandySwap
:type A: List[int] :type B: List[int] :rtype: List[int]
Array/FairCandySwap.py:72
Methodfind
(board, x, y, word)
DFS/WordSearch.py:378
Methodfind
(board, x, y, word, pre)
DFS/WordSearchII.py:90
MethodfindAnagrams
:type s: str :type p: str :rtype: List[int]
DP/FindAllAnagramsInAString.py:97
MethodfindAndReplacePattern
:type words: List[str] :type pattern: str :rtype: List[str]
String/FindAndReplacePattern.py:44
MethodfindBottomLeftValue
:type root: TreeNode :rtype: int
BFS/FindBottomLeftTreeValue.py:72
FunctionfindKthLargest
(nums, k)
Array/KthLargestElementInAnArray.js:87
MethodfindKthLargest
:type nums: List[int] :type k: int :rtype: int
Array/KthLargestElementInAnArray.py:125
MethodfindLengthOfLCIS
:type nums: List[int] :rtype: int
DP/LongestContinuousIncreasingSubsequence.py:25
MethodfindLongestChain
:type pairs: List[List[int]] :rtype: int
DP/MaximumLengthOfPairChain.py:82
MethodfindMedian
:rtype: float
Heap/FindMedianFromDataStream.py:175
MethodfindMedianSortedArrays
:type nums1: List[int] :type nums2: List[int] :rtype: float
Array/MedianOfTwoSorted.py:66
MethodfindMin
:type nums: List[int] :rtype: int
Array/FindMinimumInRotatedSortedArrayII.py:56
MethodfindMin
:type nums: List[int] :rtype: int
Array/FindMinimumInRotatedSortedArray.py:47
MethodfindNumberOfLIS
:type nums: List[int] :rtype: int
DP/NumberofLongestIncreasingSubsequence.py:69
MethodfindPeakElement
:type nums: List[int] :rtype: int
Array/FindPeakElement.py:36
MethodfindRestaurant
:type list1: List[str] :type list2: List[str] :rtype: List[str]
Array/MinimumIndexSumOfTwoLists.py:40
MethodfindWords
:type board: List[List[str]] :type words: List[str] :rtype: List[str]
DFS/WordSearchII.py:71
MethodfirstUniqChar
:type s: str :rtype: int
String/FirstUniqueCharacterInAString.py:27
MethodfizzBuzz
:type n: int :rtype: List[str]
Array/FizzBuzz.py:46
MethodfrequencySort
:type s: str :rtype: str
String/SortCharactersByFrequency.py:53
Methodgenerate
:type numRows: int :rtype: List[List[int]]
Array/Pascal's TriangleI_II.py:39
MethodgenerateMatrix
:type n: int :rtype: List[List[int]]
Array/SpiralMatrixII.py:25
MethodgenerateParenthesis
:type n: int :rtype: List[str]
Backtracking/GenerateParentheses.py:26
MethodgetIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
Array/IntersectionOfTwoLinkedLists.py:91
MethodgetLeftAndRight
(pre, post)
Tree/ConstructBinaryTreeFromPreorderAndPostorderTraversal.py:78
MethodgetLength
(node)
Array/RotateList.py:60
MethodgetRandom
Get a random element from the set. :rtype: int
Design/InsertDeleteGetRandomO(1).py:117
Methodget_multiple
(time, all_times)
Array/3SumWithMultiplicity.py:89
Methodget_root
:rtype: TreeNode
Tree/CompleteBinaryTreeInserter.py:128
MethodgroupAnagrams
:type strs: List[str] :rtype: List[List[str]]
Array/GroupAnagrams.py:31
MethodhammingDistance
:type x: int :type y: int :rtype: int
String/HammingDistance.py:29
FunctionhasCycle
(head)
Array/LinkedListCycle.js:15
MethodhasCycle
:type head: ListNode :rtype: bool
Array/LinkedListCycle.py:32
MethodhasPathSum
:type root: TreeNode :type sum: int :rtype: bool
DFS/PathSum.py:35
Methodhelper
(prev, root, sum)
DFS/PathSum.py:44
Methodhelper
(prev, root, sum, path)
Tree/PathSumII.py:49
Methodhelper
(root, string)
Tree/SumRootToLeafNumbers.py:63
Methodhelper
(root)
Tree/BinaryTreeMaximumPathSum.py:142
Methodhelper
(x, y)
Array/NumberOfIslands.py:53
Methodhelper
(x, y, result=0)
Array/MaxAreaOfIsland.py:52
MethodinOrderTraversal
(root)
Tree/ValidateBinarySearchTree.py:62
MethodincreasingTriplet
:type nums: List[int] :rtype: bool
Array/IncreasingTripletSubsequence.py:60
Methodinsert
Inserts a word into the trie. :type word: str :rtype: void
Tree/Trie.py:57
Methodinsert
Inserts a value to the set. Returns true if the set did not already contain the specified element. :type val: int :rtype: boo
Design/InsertDeleteGetRandomO(1).py:80
Methodintersect
:type nums1: List[int] :type nums2: List[int] :rtype: List[int]
Array/IntersectionOfTwoArraysII.py:49
Methodintersection
:type nums1: List[int] :type nums2: List[int] :rtype: List[int]
Array/IntersectionOfTwoArrays.py:33
MethodisAnagram
:type s: str :type t: str :rtype: bool
String/ValidAnagram.py:37
MethodisIdealPermutation
:type A: List[int] :rtype: bool
Array/GlobalAndLocalInversions.py:36
MethodisIsomorphic
:type s: str :type t: str :rtype: bool
String/IsomorphicStrings.py:40
MethodisLongPressedName
:type name: str :type typed: str :rtype: bool
String/LongPressedName.py:45
MethodisNumber
:type s: str :rtype: bool
String/ValidNumber.py:40
MethodisPalindrome
:type s: str :rtype: bool
String/ValidPalindrome.py:26
MethodisSymmetric
:type root: TreeNode :rtype: bool
Tree/SymmetricTree.py:43
MethodisValid
:type s: str :rtype: bool
String/ValidParentheses.py:41
MethodisValidBST
:type root: TreeNode :rtype: bool
Tree/ValidateBinarySearchTree.py:52
Methodjudge
(dict_word, word)
String/ReplaceWords.py:64
Methodjump
:type nums: List[int] :rtype: int
Array/JumpGameII.py:29
MethodkthSmallest
(self, root: TreeNode, k: int)
Tree/KthSmallestElementInABST.py:70
MethodladderLength
:type beginWord: str :type endWord: str :type wordList: List[str] :rtype: int
BFS/WordLadder.py:56
← previousnext →101–200 of 332, ranked by callers