MCPcopy Create free account

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

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

MethodfindMaxConsecutiveOnes
(int[] nums)
Java/485. Max_Consecutive_ones.java:2
MethodfindMaximumXOR
(int[] nums)
Java/421.MaximumXORofTwoNumbersInAnArray.java:3
MethodfindMedian
(self)
Python/295. FindMedianFromDataStream.py:31
MethodfindMedian
C++/295. FindMedianfromDataStream.cpp:35
MethodfindMedianSortedArrays
(self, nums1: List[int], nums2: List[int])
Python/4. MedianOfTwoSortedArrays.py:52
MethodfindMedianSortedArrays
C++/4. MedianOfTwoSortedArrays.cpp:9
MethodfindMedianSortedArrays
(int[] nums1, int[] nums2)
Java/4.MedianOfTwoSortedArrays.java:6
MethodfindMin
C++/154. FindMinimumInRotatedSortedArrayII.cpp:12
MethodfindMin
C++/153.FindMinimuminRotatedSortedArray.cpp:3
MethodfindNumbers
C++/1295. Find Numbers with Even Number of Digits.cpp:8
MethodfindNumbers
(int[] nums)
Java/1295. Find_Number_with_even.java:12
MethodfindPairs
C++/532. K-diffPairsInAnArray.cpp:6
MethodfindPath
C++/236. LowestCommonAncestorOfABinaryTree.cpp:14
MethodfindPeakElement
finds the peak element in the array :param arr: List[int] :return: the peak element int
Python/162.FindPeakElement.py:5
MethodfindPeakElement
C++/162.FindPeakElement.cpp:3
MethodfindRelativeRanks
C++/506. Relative Ranks.cpp:16
MethodfindRepeatedDnaSequences
C++/187. RepeatedDNASequences.cpp:47
MethodfindRepeatedDnaSequences
(String s)
Java/187. RepeatedDnaSequences.java:28
MethodfindSmallestSetOfVertices
C++/1557.MinimumNumberOfVerticesToReachAllNodes.cpp:9
MethodfindTheDifference
C++/389. FindtheDifference.cpp:25
MethodfindTilt
C++/563. Binary Tree Tilt.cpp:36
MethodfindUnsortedSubarray
C++/581.ShortestUnsortedContinuousSubarray.cpp:3
MethodfindWords
(self, words)
Python/500.KeyboardRow.py:14
MethodfindWords
C++/500. KeyboardRow.cpp:12
MethodfirstMissingPositive
(self, nums: List[int])
Python/41. FirstMissingPositive.py:37
MethodfirstMissingPositive
(self, nums: List[int])
Python/41. firstMissingPositive.py:2
MethodfirstMissingPositive
C++/41. FirstMissingPositive.cpp:3
MethodfirstMissingPositive
(int[] A)
Java/41. First Missing Positive.java:8
MethodfirstUniqChar
(self, s: str)
Python/387.FirstUniqueCharInString.py:5
MethodfirstUniqChar
(String s)
Java/387.First Unique Character in a String.java:3
MethodflipAndInvertImage
C++/832. Flipping an Image.cpp:16
MethodfloodFill
C++/733. FloodFill.cpp:29
Methodfollow
Follower follows a followee. If the operation is invalid, it should be a no-op. */
C++/355. DesignTwitter.cpp:93
MethodfourSum
C++/18. FourSum.cpp:45
MethodfourSumCount
The goal is to find the count of all options where A[i] + B[j] + C[k] + D[l] = 0 We can now change this to: A[i] + B[j] = - C[k] - D[l] Which equals
Java/454.4SumII.java:25
MethodfreqAlphabets
C++/1309.DecryptStringFromAlphabetToIntegerMapping.cpp:3
MethodfrequencySort
C++/451. Sort Characters By Frequency.cpp:19
MethodfrontBackSplit
C++/148. SortList.cpp:41
Methodfun
C++/1123. Lowest Common Ancestor of Deepest Leaves.cpp:14
Methodfunc
C++/179.Largest Number.cpp:5
Methodfunc
C++/124. Binary_Tree_Maximum.cpp:14
Methodfunc
Decodes your encoded data to tree.
C++/297. SerializeAndDeserializeBinaryTree.cpp:30
MethodgameOfLife
C++/289. GameOfLife.cpp:33
Methodgenerate
creates a two dimensional array holding a pascal triangle of the desired height :param num: int the height of the triangle
Python/118. PascalsTriangle.py:7
Methodgenerate
C++/118. PascalTriangle.cpp:11
Methodgenerate
(int numRows)
Java/118. PascalsTriangle.java:15
MethodgenerateMatrix
C++/59.SpiralMatrixII.cpp:3
MethodgenerateParenthesis
C++/22. GenerateParenthesis.cpp:41
MethodgenerateParenthesis
(int n)
Java/22. generatePara.java:24
Methodget
C++/706.DesignHashMap.cpp:78
MethodgetAllElements
C++/1305. AllElementsinTwoBinarySearchTrees.cpp:27
MethodgetAverageTime
C++/1396.DesignUndergroundSystem.cpp:32
MethodgetConcatenation
C++/1929. Concatenation of Array.cpp:8
MethodgetDecimalValue
C++/1290. Convert Binary Number in a Linked List to Integer.cpp:18
MethodgetHint
C++/299. Bulls_and_Cows.cpp:22
MethodgetMaximumGenerated
C++/1646. Get Maximum in Generated Array.cpp:15
MethodgetMin
C++/155. Min Stack.cpp:55
MethodgetNewsFeed
C++/355. DesignTwitter.cpp:51
MethodgetRandom
Get a random element from the set. */
C++/380. Insert Delete GetRandom O(1).cpp:56
MethodgetSmallestString
C++/1663.SmallestStringWithAGivenNumericValue.cpp:3
MethodgetTargetCopy
C++/1379. FindaCorrespondingNodeofaBinaryTreeinaCloneofThatTree.cpp:73
MethodgetTargetCopyUtil
C++/1379. FindaCorrespondingNodeofaBinaryTreeinaCloneofThatTree.cpp:57
MethodgetTargetPath
C++/1379. FindaCorrespondingNodeofaBinaryTreeinaCloneofThatTree.cpp:28
MethodgetValue
C++/1476. Subrectangle Queries.cpp:24
Methodget_angle
C++/1610. MaximumNumberOfVisiblePoints.cpp:59
MethodgrayCode
C++/89. GrayCode.cpp:22
MethodgroupAnagrams
(self, strs)
Python/49. GroupAnagrams.py:14
MethodhammingDistance
(self, x, y)
Python/461.HammingDistance.py:4
MethodhammingDistance
C++/461. HammingDistance.cpp:36
FunctionhammingWeight
C++/191.NumberOf1Bits.cpp:3
MethodhasAlternatingBits
C++/693. BinaryNumberwithAlternatingBits.cpp:22
MethodhasCycle
C++/141. Linked List Cycle.cpp:37
MethodhasNext
C++/173.BinarySearchTreeIterator.cpp:79
MethodhasNext
C++/341. FlattenNestedListIterator.cpp:75
MethodhasNext
C++/284.PeekingIterator.cpp:62
MethodhasPathSum
C++/112. PathSum.cpp:44
Methodheight
C++/559. MaximumDepthOfN-aryTree.cpp:27
MethodheightChecker
C++/1051. HeightChecker.cpp:6
MethodheightChecker
(int[] heights)
Java/1051. HeightChecker.java:3
Methodhelper
C++/410.SplitArrayLargestSum.cpp:3
Methodhelper
helper will take the input array, the index or the position of the element on which we need to take the decision and the result vector of vectors
C++/78. SubsetsOfAGivenArray.cpp:4
Methodhelper
C++/639. DecodeWaysII.CPP:57
Methodhelper
C++/22. GenerateParenthesis.cpp:26
Methodhelper
C++/897.IncreasingOrderSearchTree.cpp:44
Methodhelper
helper function for traversing over the tree nodes
C++/404.SumOfLeftLeaves.cpp:17
Methodhelper
C++/105.ConstructBinaryTreefromPreorderandInorderTraversal.cpp:14
Methodhelper_dfs
this function will now check the nodes adjacent to the current node(i): if its white, it will change to blue and if its already filled, it will check
C++/785.IsGraphBipartite.cpp:9
Methodhelper_dfs
C++/399.EvaluateDivision.cpp:9
MethodhistArea
C++/85. Maximal_Rectangle.cpp:3
Methodin_history
C++/202. HappyNumber.cpp:29
MethodincreasingBST
C++/897.IncreasingOrderSearchTree.cpp:59
MethodincreasingTriplet
C++/334. Increasing Triplet Subsequence.cpp:15
Methodinit
C++/326. PowerOfThree.cpp:28
Methodinorder
implementing a partial inorder traversal and pushing the left child node in the stack
C++/173.BinarySearchTreeIterator.cpp:52
Methodinorder
This function will follow inorder traversal: 1. I will make a left call and check if it returned a non-zero value. 2. If there is a non-zero v
C++/230.KthSmallesElementInABST.cpp:26
Methodinsert
Inserts a value to the set. Returns true if the set did not already contain the specified element. */
C++/380. Insert Delete GetRandom O(1).cpp:31
MethodinsertIntoBST
C++/701. InsertIntoABinarySearchTree.cpp:15
MethodintToRoman
(self, num: int)
Python/12. Integer to Roman.py:7
Methodinterpret
C++/1678.GoalParserInterpretation.cpp:3
Methodintersect
C++/350.IntersectionOfTwoArraysII.cpp:3
← previousnext →301–400 of 846, ranked by callers