Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hsinha11/Leetcode-solutions
/ functions
Functions
798 in github.com/Hsinha11/Leetcode-solutions
⨍
Functions
798
◇
Types & classes
539
Method
cloneGraph
(Node node)
133-clone-graph/clone-graph.java:23
Method
cloneGraph
(self, node: 'Node')
133-clone-graph/clone-graph.py:12
Function
coinChange
(coins, amount)
322-coin-change/coin-change.js:8
Method
coinChange
(int[] coins, int amount)
322_Coin_Change/322_Coin_Change.java:2
Method
coinChange
(self, coins: List[int], amount: int)
322-coin-change/coin-change.py:6
Method
coinChange
(int[] coins, int amount)
322-coin-change/coin-change.java:6
Method
coloredCells
(self, n: int)
2579-Count-Total-Number-of-Colored-Cells/Count-Total-Number-of-Colored-Cells.py:2
Method
comb
(i,n,k,l,c)
77-combinations/combinations.py:6
Method
comb
77-combinations/combinations.cpp:3
Function
combinationSum
(candidates, target)
39-combination-sum/combination-sum.js:8
Method
combinationSum
(int[] candidates, int target)
39-combination-sum/combination-sum.java:6
Method
combinationSum
(self, candidates: List[int], target: int)
39-combination-sum/combination-sum.py:6
Method
combinationSum3
(self, k: int, n: int)
-216-Combination-Sum-III/Approach2.py:4
Method
combinationSum3
(self, k: int, n: int)
-216-Combination-Sum-III/Approach1.py:4
Method
combine
(self, n: int, k: int)
77-combinations/combinations.py:2
Method
combine
77-combinations/combinations.cpp:14
Method
commonChars
(self, A: List[str])
1044-find-common-characters/find-common-characters.py:2
Method
compareVersion
(self, version1, version2)
165-compare-version-numbers/compare-version-numbers.py:2
Method
completePrime
(self, num: int)
4100-complete-prime-number/complete-prime-number.py:16
Method
concatWithReverse
(self, nums: list[int])
4299-concatenate-array-with-reverse/concatenate-array-with-reverse.py:2
Function
containsDuplicate
(nums)
217-contains-duplicate/contains-duplicate.js:7
Method
containsDuplicate
(int[] nums)
217-contains-duplicate/contains-duplicate.java:7
Method
containsDuplicate
(self, nums: List[int])
217-contains-duplicate/contains-duplicate.py:6
Function
convert
(s: str, numRows: int)
6.Zigzag-Conversion/zigzag-conversion.py:1
Function
countBits
(n)
338-counting-bits/counting-bits.js:7
Method
countBits
(self, n: int)
338-counting-bits/counting-bits.py:6
Method
countBits
(int n)
338-counting-bits/counting-bits.java:4
Method
countConsistentStrings
(self, a: str, w: List[str])
1786-count-the-number-of-consistent-strings/count-the-number-of-consistent-strings.py:2
Method
countElements
(self, nums: List[int], k: int)
4141-count-elements-with-at-least-k-greater-values/count-elements-with-at-least-k-greater-values.py:2
Method
countHillValley
(self, nums: List[int])
2316-count-hills-and-valleys-in-an-array/count-hills-and-valleys-in-an-array.py:2
Method
countMaxOrSubsets
(self, nums: List[int])
2170-count-number-of-maximum-bitwise-or-subsets/count-number-of-maximum-bitwise-or-subsets.py:2
Method
countMaxOrSubsets
2044-count-number-of-maximum-bitwise-OR-subsets/count_number_of_maximum_bitwise_OR_subsets.cpp:17
Method
countNodes
(self, root: Optional[TreeNode])
222-count-complete-tree-nodes/count-complete-tree-nodes.py:8
Method
countOdds
(self, low: int, high: int)
1630-count-odd-numbers-in-an-interval-range/count-odd-numbers-in-an-interval-range.py:2
Method
countOperations
(self, num1: int, num2: int)
2288-count-operations-to-obtain-zero/count-operations-to-obtain-zero.py:2
Method
countPairs
2917-count-pairs-whose-sum-is-less-than-target/count-pairs-whose-sum-is-less-than-target.cpp:3
Method
countPairs
(self, nums: List[int], k: int)
2277-count-equal-and-divisible-pairs-in-an-array/count-equal-and-divisible-pairs-in-an-array.py:2
Method
countPartitions
(self, l: List[int])
3704-count-partitions-with-even-sum-difference/count-partitions-with-even-sum-difference.py:2
Method
countPoints
(self, points: List[List[int]], queries: List[List[int]])
1939-queries-on-number-of-points-inside-a-circle/queries-on-number-of-points-inside-a-circle.py:2
Function
countSubstrings
(s)
647-palindromic-substrings/palindromic-substrings.js:7
Method
countSubstrings
(String s)
647-palindromic-substrings/palindromic-substrings.java:4
Method
countSubstrings
(self, s: str)
647-palindromic-substrings/palindromic-substrings.py:4
Method
countTriples
(self, n: int)
2037-count-square-sum-triples/count-square-sum-triples.py:2
Method
countUnguarded
(self, m: int, n: int, g: list[list[int]], w: list[list[int]])
2343-count-unguarded-cells-in-the-grid/count-unguarded-cells-in-the-grid.py:2
Method
countValidSelections
(self, nums: List[int])
3616-make-array-elements-equal-to-zero/make-array-elements-equal-to-zero.py:2
Function
count_of_integers
2719-count-of-integers/2719-count-of-integers.cpp:63
Method
createBinaryTree
(self, descr: List[List[int]])
2306-create-binary-tree-from-descriptions/create-binary-tree-from-descriptions.py:8
Method
cycleLengthQueries
2509-cycle-length-queries-in-a-tree/2509-cycle-length-queries-in-a-tree.cpp:10
Function
debounce
(fn, t)
2743-debounce/debounce.js:6
Method
decode
Decodes a shortened URL to its original URL. Time Complexity: O(1) average
535-encode-and-decode-TinyURL /EncodeAndDecodeTinyUrl.java:69
Method
delNodes
(self, root, to_delete)
-1110-Delete Nodes and Return Forest/Delete Nodes and Return Forest.py:21
Method
deleteAndEarn
(self, nums: List[int])
740-delete-and-earn/delete-and-earn.py:2
Method
deleteAtIndex
(self, index: int)
838-design-linked-list/design-linked-list.py:25
Method
deleteDuplicates
Remove Duplicates from Sorted List II/Remove Duplicates from Sorted List II.cpp:13
Method
deleteFront
Function to delete the front element
641-design-circular-deque/design-circular-deque.cpp:56
Method
deleteLast
Function to delete the last element
641-design-circular-deque/design-circular-deque.cpp:72
Method
deleteNode
(self, node: 'ListNode')
237-delete-node-in-a-linked-list/delete-node-in-a-linked-list.py:21
Method
deleteNode
237-delete-node-in-a-linked-list/delete-node-in-a-linked-list.cpp:21
Method
deposit
(self, account: int, money: int)
2169-simple-bank-system/simple-bank-system.py:18
Method
depth
(root)
1218-lowest-common-ancestor-of-deepest-leaves/lowest-common-ancestor-of-deepest-leaves.py:10
Method
depth
(root)
896-smallest-subtree-with-all-the-deepest-nodes/smallest-subtree-with-all-the-deepest-nodes.py:9
Method
deserialize
Decodes your encoded data to tree. :type data: str :rtype: TreeNode
297-serialize-and-deserialize-binary-tree/serialize-and-deserialize-binary-tree.py:27
Method
deserialize
(self, data: str)
449-serialize-and-deserialize-bst/serialize-and-deserialize-bst.py:30
Method
dfs
(root)
1243-sum-of-nodes-with-even-valued-grandparent/sum-of-nodes-with-even-valued-grandparent.py:11
Method
dfs
(n, r, c)
427-Construct-Quad-Tree/427_Construct_quad_tree.py:14
Method
dfs
2719-count-of-integers/2719-count-of-integers.cpp:24
Method
dfs
(node)
547-number-of-provinces/number-of-provinces.py:3
Method
dfs
(i, j, l, lst)
-216-Combination-Sum-III/Approach2.py:7
Method
dfs
(i, res, last)
3453-generate-binary-strings-without-adjacent-zeros/generate-binary-strings-without-adjacent-zeros.py:5
Method
dfs
(l,r)
101-symmetric-tree/symmetric-tree.py:11
Method
dfs
(node: Optional[TreeNode])
968-binary-tree-cameras/binary-tree-cameras.py:12
Method
dfs
(root)
653-two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.py:10
Method
dfs
(original)
133-clone-graph/clone-graph.py:18
Method
differenceOfSums
(self, n: int, m: int)
3172-divisible-and-non-divisible-sums-difference/divisible-and-non-divisible-sums-difference.py:2
Method
distinctAverages
(self, nums: List[int])
2561-number-of-distinct-averages/number-of-distinct-averages.py:2
Method
distributeCandies
(self, candyType)
-575-Distribute_Candies/575-distribute-candies.py:2
Method
distributeCoins
1021-distribute-coins-in-binary-tree/distribute-coins-in-binary-tree.cpp:27
Method
distributeCoins
(self, root: Optional[TreeNode])
1021-distribute-coins-in-binary-tree/distribute-coins-in-binary-tree.py:13
Method
divide
29-Divide-two-Integers/29-Divide-two-Integers.cpp:6
Method
divideArray
2308-divide-array-into-equal-pairs/divide-array-into-equal-pairs.cpp:3
Method
dp
Returns the minimum cost to cover travel from days[i] to end.
983-minimum-cost-for-tickets/983-minimum-cost-for-tickets.py:14
Method
encode
Encodes a URL to a shortened URL. Time Complexity: O(1) average
535-encode-and-decode-TinyURL /EncodeAndDecodeTinyUrl.java:50
Function
eraseOverlapIntervals
(intervals)
435-non-overlapping-intervals/non-overlapping-intervals.js:7
Method
eraseOverlapIntervals
(int[][] intervals)
435-non-overlapping-intervals/non-overlapping-intervals.java:6
Method
eraseOverlapIntervals
(self, intervals: List[List[int]])
435-non-overlapping-intervals/non-overlapping-intervals.py:6
Method
evalRPN
(self, tokens: List[str])
150-evaluate-reverse-polish-notation/evaluate-reverse-polish-notation.py:2
Function
exist
(board, word)
79-word-search/word-search.js:6
Method
exist
(char[][] board, String word)
79-word-search/word-search.java:5
Method
f
(r,k)
514-freedom-trail/freedom-trail.py:21
Method
f
(root,h)
1218-lowest-common-ancestor-of-deepest-leaves/lowest-common-ancestor-of-deepest-leaves.py:16
Method
f
(index,curr)
1388-greatest-sum-divisible-by-three/greatest-sum-divisible-by-three.py:6
Method
f
(root,h)
896-smallest-subtree-with-all-the-deepest-nodes/smallest-subtree-with-all-the-deepest-nodes.py:15
Method
f
(root)
775-n-ary-tree-preorder-traversal/n-ary-tree-preorder-traversal.py:12
Method
fib
509. Fibonacci/509.fibonacci.cpp:4
Method
findCheapestPrice
(int n, int[][] flights, int src, int dst, int k)
-787-Cheapest Flights Within K Stops/Code.java:2
Method
findCheapestPrice
-787-Cheapest Flights Within K Stops/Code.cpp:3
Method
findCheapestPrice
(self, n, flights, src, dst, k)
-787-Cheapest Flights Within K Stops/Code.py:4
Method
findCircleNum
(self, mat: List[List[int]])
547-number-of-provinces/number-of-provinces.py:2
Method
findClosest
(self, x: int, y: int, z: int)
3830-find-closest-person/find-closest-person.py:2
Method
findCoins
3592-inverse-coin-change/inverse-coin-change.cpp:4
← previous
next →
201–300 of 798, ranked by callers