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
rotateRight
(self, head: Optional[ListNode], k: int)
61-rotate-list/rotate-list.py:20
Method
rotateString
812-rotate-string/rotate-string.cpp:3
Method
rotateString
(self, s: str, goal: str)
812-rotate-string/rotate-string.py:2
Method
scoreOfString
(self, s: str)
3379-score-of-a-string/score-of-a-string.py:2
Method
scoreValidator
(self, events: list[str])
4281-score-validator/score-validator.py:2
Function
search
(nums, target)
33-search-in-rotated-sorted-array/search-in-rotated-sorted-array.js:8
Method
search
81-Search-In-Rotated-Sorted-Array-II/rotated-sorted-array.cpp:4
Method
search
(self, nums: List[int], target: int)
33-search-in-rotated-sorted-array/search-in-rotated-sorted-array.py:6
Method
search
(int[] nums, int target)
33-search-in-rotated-sorted-array/search-in-rotated-sorted-array.java:4
Method
search
(self, nums: List[int], target: int)
792-binary-search/binary-search.py:2
Method
searchInsert
35-Search-insert-positions/35-Search-insert-positions.cpp:6
Method
serialize
Encodes a tree to a single string.
297-serialize-and-deserialize-binary-tree/serialize-and-deserialize-binary-tree.py:10
Method
serialize
(self, root: Optional[TreeNode])
449-serialize-and-deserialize-bst/serialize-and-deserialize-bst.py:17
Method
setZeroes
(self, matrix: List[List[int]])
73-set-matrix-zeroes/set-matrix-zeroes.py:6
Method
singleNonDuplicate
540. Single Element in a Sorted Array/single element in a sorted array.cpp:3
Method
singleNumber
(self, nums: List[int])
260-single-number-iii/single-number-iii.py:2
Method
singleNumber
136. SingleNumber/136. Single Number.cpp:4
Method
smallerNumbersThanCurrent
1482-how-many-numbers-are-smaller-than-the-current-number/how-many-numbers-are-smaller-than-the-current-number.cpp:6
Method
smallerNumbersThanCurrent
(self, nums: List[int])
1482-how-many-numbers-are-smaller-than-the-current-number/how-many-numbers-are-smaller-than-the-current-number.py:17
Method
smallestNumber
(self, n: int)
3676-smallest-number-with-all-set-bits/smallest-number-with-all-set-bits.py:2
Method
smallestNumber
(self, pattern: str)
2456-construct-smallest-number-from-di-string/construct-smallest-number-from-di-string.py:2
Method
smallestRange
(self, nums: List[List[int]])
632. Smallest Range Covering Elements from K Lists/smallest-range-covering-elements-from-k-lists.py:4
Method
smallestStringWithSwaps
1202-smallest-string-with-swaps/1202-smallest-string-with-swaps.cpp:35
Method
solve
Do not return anything, modify board in-place instead.
130-surrounded-regions/surrounded-regions.py:12
Method
solve
-51-N_Queens/Code.cpp:32
Method
solve
37-sudoku-solver/sudoku-solver.cpp:10
Method
solveNQueens
(int n)
-51-N_Queens/Code.java:61
Method
solveNQueens
-51-N_Queens/Code.cpp:46
Method
solveNQueens
(self, n)
-51-N_Queens/Code.py:47
Method
solveSudoku
37-sudoku-solver/sudoku-solver.cpp:5
Method
sortArray
(self, nums: List[int])
948-sort-an-array/sort-an-array.py:2
Method
sortColors
75-sort-colors/sort-colors.cpp:3
Method
sortColors
Do not return anything, modify nums in-place instead.
75-sort-colors/sort-colors.py:2
Method
sortPeople
(self, names: List[str], heights: List[int])
2502-sort-the-people/sort-the-people.py:2
Method
splitArray
-410-split-array-largest-sum/-410-split-array-largest-sum.cpp:3
Method
splitArray
410-split-array-largest-sum/Split-array-largest-sum.cpp:3
Method
strStr
28-Find-the-Index-of-the-First-Occurrence-in-a-String/28-Find-the-Index-of-the-First-Occurrence-in-a-String.cpp:6
Method
strStr
(self, haystack: str, needle: str)
28-Find-the-Index-of-the-First-Occurrence-in-a-String/28-Find-the-Index-of-the-First-Occurrence-in-a-String.py:2
Method
stringMatching
(self, words: List[str])
1524-string-matching-in-an-array/string-matching-in-an-array.py:2
Method
strongPasswordChecker
420-strong-password-checker/strong-password-checker.cpp:38
Function
subarraySum
(nums, k)
-560-Subarray-Sum-Equals-K/Subarray-Sum-Equals-K.py:1
Method
subarraySum
(self, nums: List[int], k: int)
560-subarray-sum-equals-k/subarray-sum-equals-k.py:2
Method
subarraysWithKDistinct
992-Subarrays-with-K-Different-Integers/Subarrays-with-K-Different-Integers.cpp:7
Method
subset
(nums,maxi,i,cor,ans)
2170-count-number-of-maximum-bitwise-or-subsets/count-number-of-maximum-bitwise-or-subsets.py:10
Function
subsets
(nums)
80-remove-duplicates-from-sorted-array-ii/remove-duplicates-from-sorted-array-ii.py:1
Method
subsets
(self, nums: List[int])
78-subsets/subsets.py:22
Method
subtreeWithAllDeepest
(self, root: Optional[TreeNode])
896-smallest-subtree-with-all-the-deepest-nodes/smallest-subtree-with-all-the-deepest-nodes.py:8
Method
successfulPairs
2300. Successful Pairs of Spells and Potions/Successful Pairs of Spells and potions.cpp:3
Method
successfulPairs
(self, spells: List[int], potions: List[int], success: int)
2392-successful-pairs-of-spells-and-potions/successful-pairs-of-spells-and-potions.py:12
Method
sumEvenGrandparent
(self, root: Optional[TreeNode])
1243-sum-of-nodes-with-even-valued-grandparent/sum-of-nodes-with-even-valued-grandparent.py:8
Method
sumFourDivisors
(self, nums: List[int])
1284-four-divisors/four-divisors.py:13
Method
sumOfGoodIntegers
(self, n: int, k: int)
4319-sum-of-compatible-numbers-in-range-i/sum-of-compatible-numbers-in-range-i.py:2
Method
sumOfPower
3082-find-the-sum-of-the-power-of-all-subsequences/3082-find-the-sum-of-the-power-of-all-subsequences.cpp:8
Method
sumRange
(self, left: int, right: int)
303-Range_Sum_Query/Range_Sum_Query.py:9
Method
sumRange
(self, left: int, right: int)
303-range-sum-query-immutable/range-sum-query-immutable.py:6
Method
superPow
(self,a: int, b: List[int])
372-super-pow/super-pow.py:8
Method
swapPairs
24-Swap-nodes-in-pairs/24-Swap-nodes-in-pairs.cpp:6
Method
t
(root)
776-n-ary-tree-postorder-traversal/n-ary-tree-postorder-traversal.py:13
Method
theMaximumAchievableX
(self, num: int, t: int)
2812-find-the-maximum-achievable-number/find-the-maximum-achievable-number.py:2
Function
threeSum
(nums)
-15-3Sum/3Sum.py:1
Function
threeSum
(nums)
15-3sum/3sum.js:7
Method
threeSum
(self, nums: List[int])
15-3sum/3sum.py:6
Method
threeSum
(int[] nums)
15-3sum/3sum.java:6
Function
threeSumClosest
(nums, target)
-16-3Sum-Closest/3Sum-Closest.py:1
Method
threeSumClosest
16-3sum-closest/3sum-closest.cpp:3
Method
topKFrequent
(self, nums: List[int], k: int)
347-top-k-frequent-elements/top-k-frequent-elements.py:2
Method
totalFruit
(self, nums: List[int])
940-fruit-into-baskets/fruit-into-baskets.py:2
Method
totalMoney
(self, n: int)
1716-calculate-money-in-leetcode-bank/calculate_money_in_leetcodebank.py:2
Method
totalMoney
(self, n: int)
1817-calculate-money-in-leetcode-bank/calculate-money-in-leetcode-bank.py:2
Method
totalWaviness
(self, num1: int, num2: int)
4057-total-waviness-of-numbers-in-range-i/total-waviness-of-numbers-in-range-i.py:2
Method
trailingZeroes
(self, n: int)
172-Factorial-Trailing-Zeros/factorial-trailing-zeros.py:2
Method
transfer
(self, account1: int, account2: int, money: int)
2169-simple-bank-system/simple-bank-system.py:10
Method
trap
(self, h: List[int])
42-trapping-rain-water/trapping-rain-water.py:2
Method
trapRainWater
(self, height_map)
407_Trapping_Rain_Water_II/407.Trapping_Rain_Water_II.py:17
Method
trapRainWater
407_Trapping_Rain_Water_II/407_Trapping_Rain_Water_II.cpp:8
Method
trapRainWater
(int[][] heightMap)
407_Trapping_Rain_Water_II/407_Trapping_Rain_Water_II.java:4
Method
triangularSum
(self, nums: List[int])
2324-find-triangular-sum-of-an-array/find-triangular-sum-of-an-array.py:3
Method
tribonacci
(self, n: int)
1236-n-th-tribonacci-number/n-th-tribonacci-number.py:2
Method
twoEggDrop
(self, n: int)
1884-Egg Drop with 2 Eggs and N Floors/Egg-drop-with-2-eggs-and-n-floors.py:2
Function
twoSum
(numbers, target)
-167-Two-Sum-II-Input-array-is-sorted/Two-Sum-II-Input-array-is-sorted.py:1
Function
twoSum
(nums, target)
1-two-sum/two-sum.js:8
Method
twoSum
(self, nums, target: int)
-1-Two-Sum/two-sum.py:2
Method
twoSum
(self, nums: List[int], target: int)
1-two-sum/two-sum.py:6
Method
unionbysize
2076-process-restricted-friend-requests/2076-process-restricted-friend-requests.cpp:8
Method
uniqueOccurrences
(self, arr: List[int])
1319-unique-number-of-occurrences/unique-number-of-occurrences.py:2
Function
uniquePaths
(m, n)
62-unique-paths/unique-paths.js:8
Method
uniquePaths
(self, m: int, n: int)
62-unique-paths/unique-paths.py:4
Method
uniquePaths
(int m, int n)
62-unique-paths/unique-paths.java:4
Method
uniquePathsWithObstacles
(self, obs: List[List[int]])
63-unique-paths-ii/unique-paths-ii.py:2
Method
update_row
2286-booking-concert-tickets-in-groups/2286-booking-concert-tickets-in-groups.cpp:39
Method
validStrings
(self, n: int)
3453-generate-binary-strings-without-adjacent-zeros/generate-binary-strings-without-adjacent-zeros.py:2
Method
wallsAndGates
(self, rooms: List[List[int]])
286-Walls_And_Gates/walls-and_gates.py:5
Method
withdraw
(self, account: int, money: int)
2169-simple-bank-system/simple-bank-system.py:24
Function
wordBreak
(s, wordDict)
139-word-break/word-break.js:8
Method
wordBreak
(String s, List<String> wordDict)
139-word-break/word-break.java:6
Method
wordBreak
(self, s: str, wordDict: List[str])
139-word-break/word-break.py:6
Method
zeroFilledSubarray
(self, nums: List[int])
2432-number-of-zero-filled-subarrays/number-of-zero-filled-subarrays.py:3
Method
zigzagLevelOrder
103-binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.cpp:14
← previous
701–798 of 798, ranked by callers