MCPcopy Create free account

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

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

MethodcoinChange
(int[] coins, int amount)
Java/322. CoinChange.java:18
Methodcollinear
to check if 3 points are collinear or not
C++/593. Valid Square.cpp:29
MethodcombinationSum
(self, candidates: List[int], target: int)
Python/39. combinationSum.py:2
MethodcombinationSum
C++/39. Combination Sum.cpp:57
MethodcombinationSum2
C++/40.CombinationSumII.cpp:13
MethodcombinationSum3
C++/216.CombinationSumIII.cpp:20
Methodcombine
C++/77. Combinations.cpp:51
Methodcomparator_sort
C++/871. MinimumNumberOfRefuelingStops.cpp:17
Methodconnect
connect to nodes to belong to the same set
C++/1627. Graph Connectivity With Threshold.cpp:24
Methodconnect
C++/117.PopulatingNextRightPointersInEachNodeII.cpp:21
Methodconnect
C++/116. PopulatingNextRightPointersInEachNode.cpp:21
MethodconsecutiveNumbersSum
C++/829. ConsecutiveNumbersSum.cpp:11
MethodconsecutiveNumbersSum
(int N)
Java/829. ConsecutiveNumberSum.java:38
MethodconstructMaximumBinaryTree
C++/654. MaximumBinaryTree.cpp:34
MethodconstructMaximumBinaryTreeUtil
C++/654. MaximumBinaryTree.cpp:15
MethodcontainVirus
(int[][] grid)
Java/749. ContainVirus.java:43
MethodcontainsDuplicate
C++/217. ContainsDuplicate.cpp:3
MethodcontainsNearbyAlmostDuplicate
C++/220. ContainsDuplicateIII.cpp:7
Methodconvert
C++/6. ZigzagConversion.cpp:16
MethodconvertBST
C++/538.ConvertBSTtoGreaterTree.cpp:16
MethodconvertToBase7
(self, num)
Python/504. Base7.py:3
MethodconvertToBase7
C++/504. Base 7.cpp:3
MethodcopyRandomList
(self, head: 'Node')
Python/138. CopyListWithRandomPointer.py:49
MethodcopyRandomList
C++/138.CopyListWithRandomPointer.cpp:19
MethodcountAndSay
C++/38. CountAndSay.cpp:14
MethodcountBits
(self, num: int)
Python/338. CountingBits.py:13
MethodcountBits
C++/338. CountingBits.cpp:13
MethodcountBits
counting the no. of 1's in the binary representation of each integer in the array
C++/1356.SortIntegersByTheNumberOf1Bits.cpp:4
MethodcountMatches
C++/1773.CountItemsMatchingARule.cpp:52
MethodcountNegatives
(self, grid: List[List[int]])
Python/1351. CountNegativeNumbersInASortedMatrix.py:4
MethodcountNegatives
C++/1351. Count Negative Numbers in a Sorted Matrix.cpp:55
MethodcountOdds
C++/1523.CountOddNumbersInAnIntervalRange.cpp:3
MethodcountOrders
C++/1359.CountAllValidPickupandDeliver Options.cpp:3
MethodcountPalindromicSubsequences
C++/730. CountDifferentPalindromicSubsequences.cpp:24
MethodcountPrimes
:type n: int :rtype: int
Python/204. CountPrimes.py:5
MethodcountPrimes
C++/204.CountPrimes.cpp:3
MethodcountSquares
C++/1277. CountSquareSubmatricesWithAllOnes.cpp:32
MethodcountSubstrings
(self, s: str)
Python/647. PalandromicSubstrings.py:2
MethodcountSubstrings
(String s)
Java/647. Palindromic Substrings.java:22
MethodcreateBST
C++/108. ConvertSortedArraytoBinarySearchTree.cpp:50
MethodcreateTargetArray
C++/1389. Create Target Array in the Given Order.cpp:37
Methoddecode
Decodes a shortened URL to its original URL.
C++/535.EncodeAndDecodeTinyURL.cpp:37
MethoddecodeString
C++/394. Decode String.cpp:21
MethoddecompressRLElist
C++/1313. Decompress Run-Length Encoded List.cpp:11
MethoddefangIPAddress
C++/1108. DefangingAnIPAddress.cpp:19
MethoddelElement
(int[] arr, int key, int len)
Java/27. RemoveElement.java:3
MethoddeleteAndEarn
C++/740.DeleteAndEarn.cpp:9
MethoddeleteDuplicates
C++/83. RemoveDuplicatesFromSortedList.cpp:47
MethoddeleteDuplicates
C++/82. RemoveDuplicatesFromSortedListII.cpp:33
Methoddeserialize
C++/297. SerializeAndDeserializeBinaryTree.cpp:51
MethoddestCity
(self, paths: List[List[str]])
Python/1436. DestinationCity.py:2
MethoddetectCycle
C++/142. LinkedListCycle.cpp:25
MethoddetectCycle
(final ListNode head)
Java/142_linkedlist_cycle_2.java:5
Methoddfs
(r)
Python/51. N-Queens.py:38
Methoddfs
C++/547. FriendCircles.cpp:15
Methoddfs
C++/765. Couples Holding Hands.cpp:20
Methoddfs
C++/1022. SumofRootToLeafBinaryNumbers.cpp:32
Methoddfs
C++/129. Sum Root to Leaf Numbers.cpp:51
Methoddfs
C++/733. FloodFill.cpp:13
Methoddfs
dfs function call to mark a node visited if it's not and push that node and its index into respective their vectors
C++/1202.SmallestStringWithSwaps.cpp:13
Methoddfs
C++/200. NumberOfIslands.cpp:20
Methoddfs1
C++/834. Sum of Distances in Tree.cpp:13
Methoddfs2
C++/834. Sum of Distances in Tree.cpp:25
MethoddiStringMatch
C++/942. DIStringMatch.cpp:12
MethoddiagonalSum
C++/1572. Matrix Diagonal Sum.cpp:8
MethoddiameterHelper
C++/543. DiameterOfBinaryTree.cpp:33
MethoddiameterOfBinaryTree
C++/543. DiameterOfBinaryTree.cpp:44
Methoddistance
returns euclidean distance between 2 points
C++/593. Valid Square.cpp:15
MethoddistinctSubseqII
C++/940. DistinctSubseqII.cpp:9
Methoddivide
C++/29.DivideTwoIntegers.cpp:3
MethoddivisorGame
C++/1025. DivisorGame.cpp:14
MethodduplicateZeros
(int[] arr)
Java/1089. DuplicateZeros.java:10
Methodedit
C++/72. Edit_Distance.cpp:13
Methodencode
Encodes a URL to a shortened URL.
C++/535.EncodeAndDecodeTinyURL.cpp:18
MethodequalSubstring
(String s, String t, int maxCost)
Java/1208. GetEqualSubstringsWithinBudget.java:38
MethodexclusiveTime
:type n: int :type logs: List[str] :rtype: List[int]
Python/636. ExclusiveTimeOfFunctions.py:4
Methodexist
C++/79.WordSearch.cpp:3
Methodexist
(char[][] board, String word)
Java/79. WordSearch.java:22
MethodfactorsOf
(int n)
Java/1050. PrimeFactors.java:10
Methodfib
C++/509.FibonacciNumber.cpp:6
MethodfindAllCombinations
C++/77. Combinations.cpp:57
MethodfindAnagrams
C++/438. FindAllAnagramsInAString.cpp:23
MethodfindAnagrams
(String s, String p)
Java/438. FindAllAnagramsInAString.java:36
MethodfindAndReplacePattern
C++/890. Find and Replace Pattern.cpp:9
MethodfindCandidate
C++/169. Majority_Element.cpp:16
MethodfindCircleNum
C++/547. FriendCircles.cpp:24
MethodfindComplement
C++/476. NumberComplement.cpp:18
MethodfindContentChildren
:type g: List[int] :type s: List[int] :rtype: int
Python/455. AssignCookies.py:10
MethodfindDisappearedNumbers
:type nums: List[int] :rtype: List[int]
Python/448.FindAllNumbersDisappearedinanArray.py:2
MethodfindDisappearedNumbers
C++/448. Find_All_Numbers_Disappeared_in_an_Array.cpp:6
MethodfindDistance
returns distance to 0
C++/542. 01Matrix.cpp:15
MethodfindDuplicate
(self, nums)
Python/287. FindTheDuplicateNumber.py:5
MethodfindDuplicate
C++/287. Find the Duplicate Number.cpp:3
MethodfindDuplicate
(int[] nums)
Java/287. FindTheDuplicateNumber.java:21
MethodfindDuplicates
(int[] nums)
Java/442. FindAllDuplicatesInAnArray.java:13
MethodfindInMountainArray
C++/1095. Find in Mountain Array.cpp:32
MethodfindJudge
C++/997. FindTheTownJudge.cpp:57
MethodfindKthLargest
(int[] nums, int k)
Java/215.KthElementInAnArray.java:13
MethodfindKthPositive
C++/1539. KthMissingPositiveNumber.cpp:20
MethodfindMaxConsecutiveOnes
(self, nums)
Python/485. MaxConsecutiveOnes.py:9
← previousnext →201–300 of 846, ranked by callers