MCPcopy Create free account

hub / github.com/SHY-Corp/LeetCode-Solutions / functions

Functions846 in github.com/SHY-Corp/LeetCode-Solutions

MethodrunningSum
(int[] nums)
Java/1480.RunningSumof1DArray.java:3
MethodscoreOfParentheses
C++/856. Score of Parentheses.cpp:11
Methodscramble
C++/87. ScrambleString.cpp:6
Methodsearch
(self, nums, target)
Python/704. BinarySearch.py:6
Methodsearch
(self, nums, target)
Python/33. Search in Rotated Sorted Array.py:68
Methodsearch
Returns if the word is in the trie.
Python/208. ImplementTrie.py:27
Methodsearch
C++/81. Search in Rotated Sorted Array II.cpp:13
Methodsearch
C++/33.SearchInRotatedSortedArray.cpp:3
Methodsearch
search for the dad of a given node
C++/1627. Graph Connectivity With Threshold.cpp:19
Methodsearch
Iterative function to search a string in a trie. It returns true if the string is found in the Trie, else it returns false
C++/720.LongestWordInDictionary.cpp:75
MethodsearchBST
C++/700.SearchInABinarySearchTree.cpp:15
MethodsearchInsert
(self, nums: List[int], target: int)
Python/35. SearchInsertPosition.py:5
MethodsearchInsert
C++/35. SearchInsertPosition.cpp:9
MethodsearchInsert
(int[] nums, int target)
Java/35.SearchInsertPosition.java:45
MethodsearchMatrix
C++/240.SearchA2DMatrixII.cpp:3
MethodsearchMatrix
C++/74. SearchA2DMatrix.cpp:21
MethodsearchRange
C++/34. FindFirstAndLastPositionOfElementinSortedArray.cpp:12
Methodseat
C++/855. ExamRoom.cpp:59
MethodselfDividingNumbers
(self, left: int, right: int)
Python/728. SelfDividingNumbers.py:3
Methodseparate
C++/202. HappyNumber.cpp:18
Methodserialize
Encodes a tree to a single string
C++/297. SerializeAndDeserializeBinaryTree.cpp:19
MethodsetZeroes
(self, matrix: List[List[int]])
Python/73. SetMatrixZeroes.py:7
MethodsetZeroes
C++/73. SetMatrixZeroes.cpp:7
MethodshiftGrid
C++/1260.Shift2DGrid.cpp:3
MethodshipWithinDays
C++/1011. Capacity To Ship Packages Within D Days.cpp:18
Methodshuffle
(self, nums: List[int], n: int)
Python/1470. ShuffleTheArray.py:6
Methodshuffle
C++/1470. ShuffleTheArray.cpp:38
MethodsimplifyPath
C++/71.SimplifyPath.cpp:3
MethodsingleNonDuplicate
C++/540. SingleElementInASortedArray.cpp:8
MethodsingleNonDuplicate
(int[] nums)
Java/540. SingleElementInASortedArray.java:20
MethodsingleNumber
(self, nums)
Python/137. SingleNumberII.py:3
MethodsingleNumber
(self, nums)
Python/136.SingleNumber.py:7
MethodsingleNumber
C++/136. Single Number.cpp:3
Methodslope
returns the slope of 2 points
C++/593. Valid Square.cpp:22
MethodslowestKey
C++/1629. SlowestKey.cpp:24
MethodsmallestDivisor
C++/1283. Find the Smallest Divisor Given a Threshold.cpp:16
MethodsmallestRepunitDivByK
C++/1015. Smallest Integer Divisible by K.cpp:14
MethodsmallestStringWithSwaps
C++/1202.SmallestStringWithSwaps.cpp:28
Methodsolve
C++/1406. StoneGameIII.cpp:32
Methodsolve
C++/312. BurstBalloons.cpp:28
Methodsolve
C++/1520.MaximumNumberOfNonOverlappingSubstrings.cpp:24
Methodsolve
C++/1563. StoneGameV.cpp:23
MethodsolveNQueens
(self, n)
Python/51. N-Queens.py:37
MethodsolveSudoku
(self, board: List[List[str]])
Python/37. SudokuSolver.py:44
MethodsortArrayByParity
(self, A: List[int])
Python/905.SortArrayByParity.py:2
MethodsortArrayByParity
C++/905. SortArrayByParity.cpp:6
MethodsortArrayByParityII
C++/922. SortArrayByParityII.cpp:15
MethodsortByBits
C++/1356.SortIntegersByTheNumberOf1Bits.cpp:29
MethodsortColors
C++/75.SortColors.cpp:9
MethodsortColors
(int[] nums)
Java/75.SortColors.java:6
MethodsortList
(self, head)
Python/148. SortList.py:38
MethodsortList
C++/148. SortList.cpp:86
Methodsortcol
C++/506. Relative Ranks.cpp:13
MethodsortedArrayToBST
C++/108. ConvertSortedArraytoBinarySearchTree.cpp:43
MethodsortedMerge
C++/148. SortList.cpp:64
MethodsortedSquares
(self, array: List[int])
Python/977.SquaresOfASortedArray.py:9
MethodsortedSquares
C++/977. SquaresOfASortedArray.cpp:13
MethodspecialArray
C++/1608. Special Array With X Elements Greater Than or Equal X.cpp:9
MethodspiralOrder
C++/54. SpiralMatrix.cpp:17
MethodsplitArray
C++/410.SplitArrayLargestSum.cpp:24
MethodsplitArraySameAverage
C++/805. SplitArrayWithSameAverage.cpp:35
Methodstartwith
C++/139. WordBreak.cpp:20
MethodstoneGameIII
C++/1406. StoneGameIII.cpp:43
MethodstoneGameV
C++/1563. StoneGameV.cpp:39
MethodstrStr
(self, haystack: str, needle: str)
Python/28. Implement strStr().py:9
MethodstrStr
C++/28. Implement strStr().cpp:13
MethodstringMatching
C++/1408. StringMatchingInAnArray.cpp:20
MethodsubarraySum
(int[] nums, int k)
Java/560. Subarray Sum Equals K.java:14
MethodsubarraysWithKDistinct
C++/992. Subarrays with K Different Integers.cpp:42
Methodsubsets
C++/78. SubsetsOfAGivenArray.cpp:26
Methodsubsets
(int[] nums)
Java/78. Subsets.java:23
MethodsubtractProductAndSum
C++/1281.SubtractTheProductAndSumOfDigitsOfAnInteger.cpp:3
MethodsumEvenAfterQueries
(self, nums, queries)
Python/985. Sum of Even Numbers After Queries.py:12
MethodsumEvenGrandparent
(TreeNode root)
Java/1315. Sum of Nodes with Even-Valued Grandparent.java:33
MethodsumFourDivisors
(self, nums)
Python/1390. FourDivisors.py:9
MethodsumNumbers
C++/129. Sum Root to Leaf Numbers.cpp:65
MethodsumOddLengthSubarrays
(self, arr: List[int])
Python/1588. SumofAllOddLengthSubarrays.py:7
MethodsumOddLengthSubarrays
C++/1588. SumofAllOddLengthSubarrays.cpp:20
MethodsumOfDistancesInTree
C++/834. Sum of Distances in Tree.cpp:34
MethodsumOfLeftLeaves
C++/404.SumOfLeftLeaves.cpp:34
MethodsumRange
So now, the range (i,j) for which we are computing the sum, we will pick the sum till last element, i.e. sum(j+1) and subtract the sum till ith
C++/303.RangeSumQueryImmutable.cpp:35
MethodsumRange
(int i, int j)
Java/307. Range Sum Query - Mutable.java:79
MethodsumRootToLeaf
C++/1022. SumofRootToLeafBinaryNumbers.cpp:45
MethodsumToN
C++/216.CombinationSumIII.cpp:27
MethodsumZero
C++/1304. FindNUniqueIntegersSumUpToZero.cpp:17
MethodsuperEggDrop
C++/887. SuperEggDrop.cpp:66
MethodswapNodes
C++/1721.SwappingNodesInALinkedList.cpp:13
MethodswapPairs
(self, head: ListNode)
Python/24. Swap Nodes in Pairs.py:19
MethodswapPairs
C++/24. Swap_Nodes_In_Pairs.cpp:23
MethodtargetArray
C++/40.CombinationSumII.cpp:20
Methodtargetsum
C++/39. Combination Sum.cpp:37
MethodthirdMax
(int[] nums)
Java/414.ThirdMaximumNumber.java:3
MethodthreeEqualParts
C++/927. ThreeEqualParts.cpp:5
MethodthreeSum
(int[] nums)
Java/15.3 Sum.java:27
MethodthreeSumClosest
(self, nums, target)
Python/16. 3SumClosest.py:11
MethodthreeSumMulti
C++/923.3SumWithMultiplicity.cpp:3
Functionthree_sum
(nums: List[int])
Python/15. 3sum.py:11
MethodtinyURL
helper function to convert a url to its tiny form
C++/535.EncodeAndDecodeTinyURL.cpp:10
MethodtoHex
C++/405. ConvertNumberToHexadecimal.cpp:67
Methodtop
Get the top element.
Python/225.ImplementStackUsingQueues.py:29
← previousnext →701–800 of 846, ranked by callers