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
findComplement
(self, num: int)
476-number-complement/number-complement.py:2
Method
findDegrees
(self, matrix: list[list[int]])
4271-find-the-degree-of-each-vertex/find-the-degree-of-each-vertex.py:2
Method
findDuplicates
442-find-all-duplicates-in-an-array/find-all-duplicates-in-an-array.cpp:3
Method
findErrorNums
(self, nums: List[int])
645-set-mismatch/set-mismatch.py:2
Method
findFinalValue
(self, nums: List[int], original: int)
2274-keep-multiplying-found-values-by-two/keep-multiplying-found-values-by-two.py:2
Method
findKthLargest
(self, nums: List[int], k: int)
215-kth-largest-element-in-an-array/kth-largest-element-in-an-array.py:4
Method
findKthNode
25. Reverse Nodes in k-Group/Solution.cpp:27
Method
findKthPositive
(self, arr: List[int], k: int)
1646-kth-missing-positive-number/kth-missing-positive-number.py:2
Method
findLHS
(self, nums: List[int])
594-longest-harmonious-subsequence/longest-harmonious-subsequence.py:3
Method
findLucky
(self, arr: List[int])
1510-find-lucky-integer-in-an-array/find-lucky-integer-in-an-array.py:2
Method
findMatrix
(self, nums: List[int])
2724-convert-an-array-into-a-2d-array-with-conditions/convert-an-array-into-a-2d-array-with-conditions.py:2
Method
findMaxAverage
643-maximum-average-subarray-i/maximum-average-subarray-i.cpp:3
Method
findMaxConsecutiveOnes
485. MaxconsecutiveOnes/485. maxconsecutiveones.cpp:4
Method
findMaxForm
(self, strs: List[str], m: int, n: int)
474-ones-and-zeroes/ones-and-zeroes.py:2
Method
findMaximizedCapital
(self, k: int, w: int, profits: List[int], capital: List[int])
502-ipo/ipo.py:2
Method
findMaximumScore
(self, nums: List[int])
3528-reach-end-of-array-with-max-score/reach-end-of-array-with-max-score.py:2
Method
findMedian
(self)
295-find-median-from-data-stream/find-median-from-data-stream.py:16
Function
findMin
(nums)
153-find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array.js:7
Method
findMin
(int[] nums)
153-find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array.java:4
Method
findMin
(self, nums: List[int])
153-find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array.py:6
Function
findMinArrowShots
(points)
452-minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.js:7
Method
findMinArrowShots
(int[][] points)
452-minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.java:6
Method
findMinArrowShots
(self, points: List[List[int]])
452-minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.py:6
Method
findMissingAndRepeatedValues
(self, grid: List[List[int]])
3227-find-missing-and-repeated-values/find-missing-and-repeated-values.py:2
Method
findMissingAndRepeatedValues
(int[][] grid)
2965-Find_Missing_And_Repeated_Value/FindMissingAndRepeatedValues.java:2
Method
findPoisonedDuration
(self, time: List[int], duration: int)
495-teemo-attacking/teemo-attacking.py:2
Method
findRelativeRanks
(self, score: List[int])
506-relative-ranks/relative-ranks.py:2
Method
findRotateSteps
(self, ring: str, key: str)
514-freedom-trail/freedom-trail.py:19
Method
findRotation
(self, m: List[List[int]], target: List[List[int]])
2015-determine-whether-matrix-can-be-obtained-by-rotation/determine-whether-matrix-can-be-obtained-by-rotation.py:2
Function
findTarget
(root, k)
-653-Two-Sum-IV-Input-is-a-BST/Two-Sum-IV-Input-is-a-BST.py:1
Method
findTarget
(self, root: Optional[TreeNode], k: int)
653-two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.py:8
Method
findTheDistanceValue
(self, arr1: List[int], arr2: List[int], d: int)
1486-find-the-distance-value-between-two-arrays/find-the-distance-value-between-two-arrays.py:2
Method
findThePrefixCommonArray
(self, A: List[int], B: List[int])
2766-find-the-prefix-common-array-of-two-arrays/find-the-prefix-common-array-of-two-arrays.py:2
Method
findTheWinner
1823-find-the-winner-of-circular-game/find-winner-of-circular-game.cpp:3
Method
findXSum
(self, nums: List[int], k: int, x: int)
3610-find-x-sum-of-all-k-long-subarrays-i/find-x-sum-of-all-k-long-subarrays-i.py:14
Method
find_row_with_at_least
find leftmost row in [ql, qr] with maxFree >= k, or -1
2286-booking-concert-tickets-in-groups/2286-booking-concert-tickets-in-groups.cpp:75
Method
find_up
2076-process-restricted-friend-requests/2076-process-restricted-friend-requests.cpp:4
Method
flipEquiv
951-flip-equivalent-binary-trees/951-flip-equivalent-binary-trees.cpp:17
Function
fourSum
(nums, target)
-18-4Sum/4Sum.py:1
Method
fourSum
(self, nums: List[int], target: int)
18-4sum/4sum.py:2
Method
fractionAddition
(self, expression: str)
592-fraction-addition-and-subtraction/fraction-addition-and-subtraction.py:5
Method
frequencySort
(self, nums: List[int])
1741-sort-array-by-increasing-frequency/sort-array-by-increasing-frequency.py:2
Method
friendRequests
2076-process-restricted-friend-requests/2076-process-restricted-friend-requests.cpp:20
Method
fun
1021-distribute-coins-in-binary-tree/distribute-coins-in-binary-tree.cpp:15
Method
generate
:type numRows: int :rtype: List[List[int]]
-118-Pascal's-triangle/pascals_triangle.py:2
Method
generate
:type numRows: int :rtype: List[List[int]]
118-Pascal's-triangle/pascals_triangle.py:2
Method
generateParenthesis
(self, n: int)
22-generate-parentheses/generate-parentheses.py:2
Method
getDecimalValue
(self, head: Optional[ListNode])
1411-convert-binary-number-in-a-linked-list-to-integer/convert-binary-number-in-a-linked-list-to-integer.py:7
Method
getFinalState
3555-final-array-state-after-k-multiplication-operations-i/final-array-state-after-k-multiplication-operations-i.cpp:3
Method
getFront
Function to get the front element
641-design-circular-deque/design-circular-deque.cpp:88
Function
getIntersectionNode
(headA, headB)
160-intersection-of-two-linked-lists/intersection-of-two-linked-lists.js:16
Method
getIntersectionNode
(self, headA: ListNode, headB: ListNode)
160-intersection-of-two-linked-lists/intersection-of-two-linked-lists.py:10
Method
getIntersectionNode
(ListNode headA, ListNode headB)
160-intersection-of-two-linked-lists/intersection-of-two-linked-lists.java:15
Method
getNoZeroIntegers
(self, n: int)
1440-convert-integer-to-the-sum-of-two-no-zero-integers/convert-integer-to-the-sum-of-two-no-zero-integers.py:2
Method
getRandom
(self)
381-insert-delete-getrandom-o1-duplicates-allowed/insert-delete-getrandom-o1-duplicates-allowed.py:28
Method
getRear
Function to get the last element
641-design-circular-deque/design-circular-deque.cpp:97
Method
getSneakyNumbers
(self, nums: List[int])
3581-the-two-sneaky-numbers-of-digitville/the-two-sneaky-numbers-of-digitville.py:2
Function
getSum
(a, b)
371-sum-of-two-integers/sum-of-two-integers.js:8
Method
getSum
(int a, int b)
371-sum-of-two-integers/sum-of-two-integers.java:4
Method
getSum
(self, a: int, b: int)
371-sum-of-two-integers/sum-of-two-integers.py:4
Method
get_sum_of_squares
(num)
202-happy-number/happy-number.py:3
Method
groupAnagrams
(self, strs: List[str])
49-group-anagrams/group-anagrams.py:2
Method
groupThePeople
(self, group: List[int])
1407-group-the-people-given-the-group-size-they-belong-to/group-the-people-given-the-group-size-they-belong-to.py:2
Method
hIndex
(self, citations: List[int])
274-h-index/h-index.py:2
Method
hIndex
(self, citations: List[int])
275-h-index-ii/h-index-ii.py:2
Method
halveArray
(self, nums: List[int])
2310-minimum-operations-to-halve-array-sum/minimum-operations-to-halve-array-sum.py:2
Function
hammingWeight
(n)
191-number-of-1-bits/number-of-1-bits.js:7
Method
hammingWeight
(self, n: int)
191-number-of-1-bits/number-of-1-bits.py:4
Method
hammingWeight
(int n)
191-number-of-1-bits/number-of-1-bits.java:5
Method
hasCycle
(self, head)
141-Linked_List_Cycle/linked_list_cycle.py:2
Function
hasPathSum
(root, sum)
-112-Path-Sum/Path-Sum.py:1
Method
hasSameDigits
(self, s: str)
3768-check-if-digits-are-equal-in-string-after-operations-i/check-if-digits-are-equal-in-string-after-operations-i.py:2
Method
height
(node)
-543-Diameter-of-Binary-Tree/-543-Diameter-of-Binary-Tree.py:12
Method
highestRated
(self, cuisine: str)
2429-design-a-food-rating-system/design-a-food-rating-system.py:33
Method
inBounds
Returns True if the position of fresh oranges is within the grid
994-Rotting-Oranges/Rotting-Oranges.cpp:8
Method
inorderTraversal
(self, root: Optional[TreeNode])
94-binary-tree-inorder-traversal/binary-tree-inorder-traversal.py:9
Method
insertFront
Function to insert an element at the front
641-design-circular-deque/design-circular-deque.cpp:20
Method
insertLast
Function to insert an element at the rear
641-design-circular-deque/design-circular-deque.cpp:38
Method
intToRoman
(self, num: int)
12-Interger-to-Roman/Integer-to-Roman.py:2
Method
intersect
(self, nums1: List[int], nums2: List[int])
350-intersection-of-two-arrays-II/intersection-of-two-arrays-II.py:5
Method
intersection
:type nums1: List[int] :type nums2: List[int] :rtype: List[int]
349-intersection-of-two-arrays/intersection-of-two-arrays.py:2
Method
intersectionSizeTwo
(self, intervals: List[List[int]])
759-set-intersection-size-at-least-two/set-intersection-size-at-least-two.py:2
Function
isAnagram
(s, t)
242-valid-anagram/valid-anagram.js:6
Method
isAnagram
:type s: str :type t: str :rtype: bool
-242-Valid-Anagram/-242-Valid_Anagram.py:2
Method
isAnagram
(String s, String t)
242-valid-anagram/valid-anagram.java:4
Method
isAnagram
(self, s: str, t: str)
242-valid-anagram/valid-anagram.py:2
Method
isBalanced
(self, root: Optional[TreeNode])
110-balanced-binary-tree/balanced-binary-tree.py:13
Method
isCircularSentence
(self, s: str)
2580-circular-sentence/circular-sentence.py:2
Method
isFull
Function to check if the deque is full
641-design-circular-deque/design-circular-deque.cpp:111
Method
isHappy
(self, n)
202-happy-number/happy-number.py:2
Method
isIsomorphic
(self, s, t)
205-isomorphic-strings/isomorphic-strings.py:2
Method
isMatch
Greedy backtracking for wildcard matching with '?' and '*'. - '?' matches any single character. - '*' matches any sequence (
44-Wildcard-Matching/wildcard-matching.py:5
Method
isMatch
44-Wildcard-Matching/44-Wildcard-Matching.cpp:3
Method
isMatch
(self, s: str, p: str)
10-Regular-Expression-Matching/Regular-Expression-Matching.py:2
Method
isPalindrome
9.ispalindrome.cpp:4
Method
isPalindrome
valid_palindrome/valid_palindrome.cpp:3
Method
isPowerOfFour
(self, n: int)
342-power-of-four/power-of-four.py:3
Method
isPowerOfThree
(self, n: int)
326-power-of-three/power-of-three.py:4
Method
isPowerOfTwo
(self, n: int)
231-power-of-two/power-of-two.py:2
Method
isPrefixOfWord
(self, sentence: str, word: str)
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.py:2
← previous
next →
301–400 of 798, ranked by callers