Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Amanhacker/Aman-Barnwal-Leetcode-Solutions
/ functions
Functions
931 in github.com/Amanhacker/Aman-Barnwal-Leetcode-Solutions
⨍
Functions
931
◇
Types & classes
605
Method
dfs
2368-reachable-nodes-with-restrictions/2368-reachable-nodes-with-restrictions.cpp:4
Method
dfs
Height of a node root
543-diameter-of-binary-tree/543-diameter-of-binary-tree.cpp:16
Method
dfs
965-univalued-binary-tree/965-univalued-binary-tree.cpp:15
Method
dfs
671-second-minimum-node-in-a-binary-tree/671-second-minimum-node-in-a-binary-tree.cpp:15
Method
dfs
501-find-mode-in-binary-search-tree/501-find-mode-in-binary-search-tree.cpp:19
Method
dfs
number-of-closed-islands/number-of-closed-islands.cpp:12
Method
dfs
886-possible-bipartition/886-possible-bipartition.cpp:4
Method
dfs
947-most-stones-removed-with-same-row-or-column/947-most-stones-removed-with-same-row-or-column.cpp:4
Method
dfs
711-number-of-distinct-islands-ii/711-number-of-distinct-islands-ii.cpp:7
Method
dfs
count-sub-islands/count-sub-islands.cpp:19
Method
dfs
Here, dp[x][y] gives us the length of longest increasing path starting from (x, y)
2328-number-of-increasing-paths-in-a-grid/2328-number-of-increasing-paths-in-a-grid.cpp:18
Method
dfs
1631-path-with-minimum-effort/1631-path-with-minimum-effort.cpp:12
Method
dfsGraph
2385-amount-of-time-for-binary-tree-to-be-infected/2385-amount-of-time-for-binary-tree-to-be-infected.cpp:15
Method
diStringMatch
942-di-string-match/942-di-string-match.cpp:4
Method
diameter
1522-diameter-of-n-ary-tree/1522-diameter-of-n-ary-tree.cpp:58
Method
diameterOfBinaryTree
543-diameter-of-binary-tree/543-diameter-of-binary-tree.cpp:28
Method
dietPlanPerformance
1176-diet-plan-performance/1176-diet-plan-performance.cpp:4
Method
dijkstra
1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.cpp:10
Method
dijkstra
1514-path-with-maximum-probability/1514-path-with-maximum-probability.cpp:4
Method
dijkstra
743-network-delay-time/743-network-delay-time.cpp:4
Method
displayTable
1418-display-table-of-food-orders-in-a-restaurant/1418-display-table-of-food-orders-in-a-restaurant.cpp:4
Method
distanceK
0863-all-nodes-distance-k-in-binary-tree/0863-all-nodes-distance-k-in-binary-tree.cpp:65
Method
distinctNumbers
1852-distinct-numbers-in-each-subarray/1852-distinct-numbers-in-each-subarray.cpp:4
Method
distributeCoins
0979-distribute-coins-in-binary-tree/0979-distribute-coins-in-binary-tree.cpp:28
Method
divideString
2138-divide-a-string-into-groups-of-size-k/2138-divide-a-string-into-groups-of-size-k.cpp:4
Method
dominantIndex
747-largest-number-at-least-twice-of-others/747-largest-number-at-least-twice-of-others.cpp:4
Method
dotProduct
Return the dotProduct of two sparse vectors
1570-dot-product-of-two-sparse-vectors/1570-dot-product-of-two-sparse-vectors.cpp:17
Method
eatenApples
1705-maximum-number-of-eaten-apples/1705-maximum-number-of-eaten-apples.cpp:4
Method
edgeScore
2374-node-with-highest-edge-score/2374-node-with-highest-edge-score.cpp:4
Method
encode
Encodes a URL to a shortened URL.
535-encode-and-decode-tinyurl/535-encode-and-decode-tinyurl.cpp:8
Method
encode
1256-encode-number/1256-encode-number.cpp:5
Method
equalToDescendants
1973-count-nodes-equal-to-sum-of-descendants/1973-count-nodes-equal-to-sum-of-descendants.cpp:28
Method
equationsPossible
0990-satisfiability-of-equality-equations/0990-satisfiability-of-equality-equations.cpp:24
Method
evalRPN
150-evaluate-reverse-polish-notation/150-evaluate-reverse-polish-notation.cpp:4
Method
evaluate
1628-design-an-expression-tree-with-evaluate-function/1628-design-an-expression-tree-with-evaluate-function.cpp:27
Method
evaluate
1628-design-an-expression-tree-with-evaluate-function/1628-design-an-expression-tree-with-evaluate-function.cpp:51
Method
eventualSafeNodes
find-eventual-safe-states/find-eventual-safe-states.cpp:39
Method
eventualSafeNodes
802-find-eventual-safe-states/802-find-eventual-safe-states.cpp:34
Method
executeInstructions
2120-execution-of-all-suffix-instructions-staying-in-a-grid/2120-execution-of-all-suffix-instructions-staying-in-a-grid.cpp:10
Method
exist
79-word-search/79-word-search.cpp:41
Method
existHelper
79-word-search/79-word-search.cpp:15
Method
expressiveWords
809-expressive-words/809-expressive-words.cpp:25
Method
extendPalindrome
647-palindromic-substrings/647-palindromic-substrings.cpp:4
Method
fetch
1756-design-most-recently-used-queue/1756-design-most-recently-used-queue.cpp:11
Method
fib
0509-fibonacci-number/0509-fibonacci-number.cpp:4
Method
finalValueAfterOperations
2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.cpp:4
Method
find
1261-find-elements-in-a-contaminated-binary-tree/1261-find-elements-in-a-contaminated-binary-tree.cpp:42
Method
findAllCasePermutations
784-letter-case-permutation/784-letter-case-permutation.cpp:4
Method
findAllCombinations
1286-iterator-for-combination/1286-iterator-for-combination.cpp:7
Method
findAllPathSum
112-path-sum/112-path-sum.cpp:15
Method
findAllPaths
113-path-sum-ii/113-path-sum-ii.cpp:15
Method
findAllPaths
129-sum-root-to-leaf-numbers/129-sum-root-to-leaf-numbers.cpp:28
Method
findAllPaths
980-unique-paths-iii/980-unique-paths-iii.cpp:16
Method
findAllPaths
257-binary-tree-paths/257-binary-tree-paths.cpp:15
Method
findAllPermutations
1079-letter-tile-possibilities/1079-letter-tile-possibilities.cpp:4
Method
findAllStrings
1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n/1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n.cpp:6
Method
findAllSubsets
1863-sum-of-all-subset-xor-totals/1863-sum-of-all-subset-xor-totals.cpp:4
Method
findAnagrams
438-find-all-anagrams-in-a-string/438-find-all-anagrams-in-a-string.cpp:4
Method
findAnagrams
0438-find-all-anagrams-in-a-string/0438-find-all-anagrams-in-a-string.cpp:4
Method
findArea
85-maximal-rectangle/85-maximal-rectangle.cpp:4
Method
findBottomLeftValue
513-find-bottom-left-tree-value/513-find-bottom-left-tree-value.cpp:45
Method
findBuildings
1762-buildings-with-an-ocean-view/1762-buildings-with-an-ocean-view.cpp:4
Method
findCenter
1791-find-center-of-star-graph/1791-find-center-of-star-graph.cpp:4
Method
findCheapestPrice
cheapest-flights-within-k-stops/cheapest-flights-within-k-stops.cpp:30
Method
findCircleNum
547-number-of-provinces/547-number-of-provinces.cpp:17
Method
findClosestElements
658-find-k-closest-elements/658-find-k-closest-elements.cpp:5
Method
findClosestLeaf
742-closest-leaf-in-a-binary-tree/742-closest-leaf-in-a-binary-tree.cpp:94
Method
findComplement
476-number-complement/476-number-complement.cpp:4
Method
findContentChildren
455-assign-cookies/455-assign-cookies.cpp:4
Method
findContestMatch
544-output-contest-matches/544-output-contest-matches.cpp:4
Method
findDiagonalOrder
498-diagonal-traverse/498-diagonal-traverse.cpp:4
Method
findDiagonalOrder
1424-diagonal-traverse-ii/1424-diagonal-traverse-ii.cpp:4
Method
findDist
Distance between node "node" and node having value n
1740-find-distance-in-a-binary-tree/1740-find-distance-in-a-binary-tree.cpp:16
Method
findDistance
Find distance between node having value p and q
1740-find-distance-in-a-binary-tree/1740-find-distance-in-a-binary-tree.cpp:45
Method
findDuplicateSubtrees
0652-find-duplicate-subtrees/0652-find-duplicate-subtrees.cpp:28
Method
findDuplicates
442-find-all-duplicates-in-an-array/442-find-all-duplicates-in-an-array.cpp:4
Method
findFarmland
find-all-groups-of-farmland/find-all-groups-of-farmland.cpp:30
Method
findFinalValue
2154-keep-multiplying-found-values-by-two/2154-keep-multiplying-found-values-by-two.cpp:4
Method
findFrequentTreeSum
0508-most-frequent-subtree-sum/0508-most-frequent-subtree-sum.cpp:42
Method
findGCD
1979-find-greatest-common-divisor-of-array/1979-find-greatest-common-divisor-of-array.cpp:20
Method
findJudge
997-find-the-town-judge/997-find-the-town-judge.cpp:4
Method
findKthLargest
215-kth-largest-element-in-an-array/215-kth-largest-element-in-an-array.cpp:4
Method
findLCA
0865-smallest-subtree-with-all-the-deepest-nodes/0865-smallest-subtree-with-all-the-deepest-nodes.cpp:42
Method
findLCA
Find LCA of two nodes having value p and q
1740-find-distance-in-a-binary-tree/1740-find-distance-in-a-binary-tree.cpp:29
Method
findLCA
1123-lowest-common-ancestor-of-deepest-leaves/1123-lowest-common-ancestor-of-deepest-leaves.cpp:42
Method
findLCA
1644-lowest-common-ancestor-of-a-binary-tree-ii/1644-lowest-common-ancestor-of-a-binary-tree-ii.cpp:13
Method
findLCA
1676-lowest-common-ancestor-of-a-binary-tree-iv/1676-lowest-common-ancestor-of-a-binary-tree-iv.cpp:15
Method
findLUSlength
521-longest-uncommon-subsequence-i/521-longest-uncommon-subsequence-i.cpp:4
Method
findLeaves
366-find-leaves-of-binary-tree/366-find-leaves-of-binary-tree.cpp:33
Method
findLength
718-maximum-length-of-repeated-subarray/718-maximum-length-of-repeated-subarray.cpp:4
Method
findLengthofLRS
Longest Repeating Subsequence - GFG/longest-repeating-subsequence.cpp:10
Method
findLevel
Level starts from 1 from root node
111-minimum-depth-of-binary-tree/111-minimum-depth-of-binary-tree.cpp:26
Method
findLevelOrder
637-average-of-levels-in-binary-tree/637-average-of-levels-in-binary-tree.cpp:27
Method
findLongestChain
maximum-length-of-pair-chain/maximum-length-of-pair-chain.cpp:8
Method
findMaxDiff
1140-stone-game-ii/1140-stone-game-ii.cpp:4
Method
findMaxScoreAlice
1406-stone-game-iii/1406-stone-game-iii.cpp:6
Method
findMedianSortedArrays
4-median-of-two-sorted-arrays/4-median-of-two-sorted-arrays.cpp:4
Method
findMiddleIndex
1991-find-the-middle-index-in-array/1991-find-the-middle-index-in-array.cpp:4
Method
findMinCost
Matrix Chain Multiplication - GFG/matrix-chain-multiplication.cpp:13
Method
findMinHeightTrees
310-minimum-height-trees/310-minimum-height-trees.cpp:40
← previous
next →
301–400 of 931, ranked by callers