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
backspaceCompare
844-backspace-string-compare/844-backspace-string-compare.cpp:4
Method
badSensor
1826-faulty-sensor/1826-faulty-sensor.cpp:4
Method
balanceBST
balance-a-binary-search-tree/balance-a-binary-search-tree.cpp:41
Method
bfs
0865-smallest-subtree-with-all-the-deepest-nodes/0865-smallest-subtree-with-all-the-deepest-nodes.cpp:15
Method
bfs
210-course-schedule-ii/210-course-schedule-ii.cpp:4
Method
bfs
742-closest-leaf-in-a-binary-tree/742-closest-leaf-in-a-binary-tree.cpp:62
Method
bfs
1602-find-nearest-right-node-in-binary-tree/1602-find-nearest-right-node-in-binary-tree.cpp:15
Method
bfs
513-find-bottom-left-tree-value/513-find-bottom-left-tree-value.cpp:15
Method
bfs
2415-reverse-odd-levels-of-binary-tree/2415-reverse-odd-levels-of-binary-tree.cpp:15
Method
bfs
1609-even-odd-tree/1609-even-odd-tree.cpp:15
Method
bfs
Form the graph
0863-all-nodes-distance-k-in-binary-tree/0863-all-nodes-distance-k-in-binary-tree.cpp:14
Method
bfs
0429-n-ary-tree-level-order-traversal/0429-n-ary-tree-level-order-traversal.cpp:24
Method
bfs
2359-find-closest-node-to-given-two-nodes/2359-find-closest-node-to-given-two-nodes.cpp:4
Method
bfs
310-minimum-height-trees/310-minimum-height-trees.cpp:4
Method
bfs
minimum-cost-to-make-at-least-one-valid-path-in-a-grid/minimum-cost-to-make-at-least-one-valid-path-in-a-grid.cpp:17
Method
bfs
0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp:22
Method
bfs
515-find-largest-value-in-each-tree-row/515-find-largest-value-in-each-tree-row.cpp:15
Method
bfs
695-max-area-of-island/695-max-area-of-island.cpp:16
Method
bfs
1123-lowest-common-ancestor-of-deepest-leaves/1123-lowest-common-ancestor-of-deepest-leaves.cpp:15
Method
bfs
1376-time-needed-to-inform-all-employees/1376-time-needed-to-inform-all-employees.cpp:6
Method
bfs
max-area-of-island/max-area-of-island.cpp:16
Method
bfs
0116-populating-next-right-pointers-in-each-node/0116-populating-next-right-pointers-in-each-node.cpp:22
Method
bfs
314-binary-tree-vertical-order-traversal/314-binary-tree-vertical-order-traversal.cpp:19
Method
bfs
1302-deepest-leaves-sum/1302-deepest-leaves-sum.cpp:15
Method
bfs
1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero/1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero.cpp:6
Method
bfs
number-of-islands/number-of-islands.cpp:16
Method
bfs
0449-serialize-and-deserialize-bst/0449-serialize-and-deserialize-bst.cpp:13
Method
bfs
733-flood-fill/733-flood-fill.cpp:15
Method
bfs
1161-maximum-level-sum-of-a-binary-tree/1161-maximum-level-sum-of-a-binary-tree.cpp:15
Method
binarySearch
69-sqrtx/69-sqrtx.cpp:4
Method
binaryTreePaths
257-binary-tree-paths/257-binary-tree-paths.cpp:37
Method
bitwiseComplement
1009-complement-of-base-10-integer/1009-complement-of-base-10-integer.cpp:4
Method
buildArray
1920-build-array-from-permutation/1920-build-array-from-permutation.cpp:4
Method
buildTree
Build the expression tree
1628-design-an-expression-tree-with-evaluate-function/1628-design-an-expression-tree-with-evaluate-function.cpp:76
Method
buildTree
105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp:57
Method
buildTreeHelper
105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp:15
Method
calcEquation
399-evaluate-division/399-evaluate-division.cpp:4
Method
calcEquation
evaluate-division/evaluate-division.cpp:4
Method
calculate
227-basic-calculator-ii/227-basic-calculator-ii.cpp:4
Method
calculateTime
1165-single-row-keyboard/1165-single-row-keyboard.cpp:4
Method
canAttendMeetings
252-meeting-rooms/252-meeting-rooms.cpp:9
Method
canBeTypedWords
1935-maximum-number-of-words-you-can-type/1935-maximum-number-of-words-you-can-type.cpp:4
Method
canConstruct
383-ransom-note/383-ransom-note.cpp:4
Method
canFinish
207-course-schedule/207-course-schedule.cpp:22
Method
canFinish
course-schedule/course-schedule.cpp:31
Method
canPermutePalindrome
266-palindrome-permutation/266-palindrome-permutation.cpp:4
Method
canPlaceFlowers
605-can-place-flowers/605-can-place-flowers.cpp:4
Method
canVisitAllRooms
841-keys-and-rooms/841-keys-and-rooms.cpp:17
Method
capitalizeTitle
2129-capitalize-the-title/2129-capitalize-the-title.cpp:4
Method
carPooling
1094-car-pooling/1094-car-pooling.cpp:4
Method
check
719-find-k-th-smallest-pair-distance/719-find-k-th-smallest-pair-distance.cpp:4
Method
checkAlmostEquivalent
2068-check-whether-two-strings-are-almost-equivalent/2068-check-whether-two-strings-are-almost-equivalent.cpp:4
Method
checkArithmeticSubarrays
1630-arithmetic-subarrays/1630-arithmetic-subarrays.cpp:4
Method
checkIfPrerequisite
course-schedule-iv/course-schedule-iv.cpp:26
Method
checkIfPrerequisite
1462-course-schedule-iv/1462-course-schedule-iv.cpp:20
Method
checkIn
1396-design-underground-system/1396-design-underground-system.cpp:13
Method
checkOnesSegment
1784-check-if-binary-string-has-at-most-one-segment-of-ones/1784-check-if-binary-string-has-at-most-one-segment-of-ones.cpp:4
Method
checkOut
1396-design-underground-system/1396-design-underground-system.cpp:19
Method
checkPerfectNumber
507-perfect-number/507-perfect-number.cpp:4
Method
checkRecord
551-student-attendance-record-i/551-student-attendance-record-i.cpp:4
Method
checkString
2124-check-if-all-as-appears-before-all-bs/2124-check-if-all-as-appears-before-all-bs.cpp:4
Method
checkSubarraySum
523-continuous-subarray-sum/523-continuous-subarray-sum.cpp:4
Method
checkValid
2133-check-if-every-row-and-column-contains-all-numbers/2133-check-if-every-row-and-column-contains-all-numbers.cpp:4
Method
checkValidString
678-valid-parenthesis-string/678-valid-parenthesis-string.cpp:4
Method
climbStairs
0070-climbing-stairs/0070-climbing-stairs.cpp:4
Method
cloneGraph
133-clone-graph/133-clone-graph.cpp:27
Method
cloneTree
1490-clone-n-ary-tree/1490-clone-n-ary-tree.cpp:45
Method
closedIsland
number-of-closed-islands/number-of-closed-islands.cpp:32
Method
closestMeetingNode
2359-find-closest-node-to-given-two-nodes/2359-find-closest-node-to-given-two-nodes.cpp:36
Method
closestValue
270-closest-binary-search-tree-value/270-closest-binary-search-tree-value.cpp:33
Method
cmp
2404-most-frequent-even-element/2404-most-frequent-even-element.cpp:4
Method
cmp
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:4
Method
cmp
937-reorder-data-in-log-files/937-reorder-data-in-log-files.cpp:4
Method
cmp
maximum-length-of-pair-chain/maximum-length-of-pair-chain.cpp:4
Method
cmp
252-meeting-rooms/252-meeting-rooms.cpp:4
Method
cmp
501-find-mode-in-binary-search-tree/501-find-mode-in-binary-search-tree.cpp:15
Method
confusingNumber
1056-confusing-number/1056-confusing-number.cpp:4
Method
connect
0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp:61
Method
connect
0116-populating-next-right-pointers-in-each-node/0116-populating-next-right-pointers-in-each-node.cpp:61
Method
construct2DArray
2022-convert-1d-array-into-2d-array/2022-convert-1d-array-into-2d-array.cpp:4
Method
constructBST
Recursively construct the balanced BST
balance-a-binary-search-tree/balance-a-binary-search-tree.cpp:27
Method
constructFromPrePost
889-construct-binary-tree-from-preorder-and-postorder-traversal/889-construct-binary-tree-from-preorder-and-postorder-traversal.cpp:31
Method
constructHelper
889-construct-binary-tree-from-preorder-and-postorder-traversal/889-construct-binary-tree-from-preorder-and-postorder-traversal.cpp:15
Method
containsCycle
1559-detect-cycles-in-2d-grid/1559-detect-cycles-in-2d-grid.cpp:38
Method
containsDuplicate
217-contains-duplicate/217-contains-duplicate.cpp:4
Method
containsPattern
1566-detect-pattern-of-length-m-repeated-k-or-more-times/1566-detect-pattern-of-length-m-repeated-k-or-more-times.cpp:4
Method
convertBST
538-convert-bst-to-greater-tree/538-convert-bst-to-greater-tree.cpp:40
Method
convertToTitle
168-excel-sheet-column-title/168-excel-sheet-column-title.cpp:4
Method
copyRandomBinaryTree
1485-clone-binary-tree-with-random-pointer/1485-clone-binary-tree-with-random-pointer.cpp:35
Method
copyRandomList
138-copy-list-with-random-pointer/138-copy-list-with-random-pointer.cpp:20
Method
correctBinaryTree
1660-correct-a-binary-tree/1660-correct-a-binary-tree.cpp:17
Method
countBattleships
0419-battleships-in-a-board/0419-battleships-in-a-board.cpp:28
Method
countBits
338-counting-bits/338-counting-bits.cpp:16
Method
countBits
0338-counting-bits/0338-counting-bits.cpp:4
Method
countElements
2148-count-elements-with-strictly-smaller-and-greater-elements/2148-count-elements-with-strictly-smaller-and-greater-elements.cpp:4
Method
countElements
1426-counting-elements/1426-counting-elements.cpp:4
Method
countGoodRectangles
1725-number-of-rectangles-that-can-form-the-largest-square/1725-number-of-rectangles-that-can-form-the-largest-square.cpp:4
Method
countHighestScoreNodes
2049-count-nodes-with-the-highest-score/2049-count-nodes-with-the-highest-score.cpp:23
Method
countKDifference
2006-count-number-of-pairs-with-absolute-difference-k/2006-count-number-of-pairs-with-absolute-difference-k.cpp:4
Method
countLargestGroup
1399-count-largest-group/1399-count-largest-group.cpp:16
← previous
next →
101–200 of 931, ranked by callers