Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RealHacker/leetcode-solutions
/ functions
Functions
604 in github.com/RealHacker/leetcode-solutions
⨍
Functions
604
◇
Types & classes
388
Method
findRepeatedDnaSequences
(self, s)
187_repeated_dna/repeated_dna_sequences.py:5
Method
findStrobogrammatic
:type n: int :rtype: List[str]
247_strobogrammatic_number_ii/strobo.py:3
Method
findSubstring
:type s: str :type words: List[str] :rtype: List[int]
030_substring_with_cancatenation_all_words/substring_concat_all_words.py:2
Method
findSubstring
:type s: str :type words: List[str] :rtype: List[int]
030_substring_with_cancatenation_all_words/substring_concat_all_words_TLE.py:2
Method
findWords
:type board: List[List[str]] :type words: List[str] :rtype: List[str]
212_word_search_ii/wordsearch.py:2
Method
firstBadVersion
:type n: int :rtype: int
278_first_bad_version/first_bad_version.py:7
Method
firstMissingPositive
:type nums: List[int] :rtype: int
041_first_missing_positive/first_missing_positive.py:2
Method
flatten
:type root: TreeNode :rtype: void Do not return anything, modify root in-place instead.
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_take2.py:2
Method
flatten
:type root: TreeNode :rtype: void Do not return anything, modify root in-place instead.
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_TLE.py:2
Method
fourSum
:type nums: List[int] :type target: int :rtype: List[List[int]]
018_four_sum/four_sum.py:27
Method
fractionToDecimal
(self, numerator, denominator)
166_fraction_to_recurring_decimal/fraction_to_decimal.py:5
Method
fractionToDecimal
:type numerator: int :type denominator: int :rtype: str
166_fraction_to_recurring_decimal/fraction_to_decimal_take2.py:2
Method
fullJustify
:type words: List[str] :type maxWidth: int :rtype: List[str]
068_text_justification/text_justification.py:2
Method
gameOfLife
:type board: List[List[int]] :rtype: void Do not return anything, modify board in-place instead.
289_game_of_life/game_of_life.py:2
Method
generate
(self, numRows)
118_pascal_triangle/pascal_triangle.py:4
Method
generateAbbreviations
:type word: str :rtype: List[str]
320_generalized_abbreviation/abbreviation.py:2
Method
generateMatrix
:type n: int :rtype: List[List[int]]
059_spiral_matrix_ii/spiral_matrix.py:2
Method
generatePalindromes
:type s: str :rtype: List[str]
267_palindrome_permutation_ii/permutations.py:4
Method
generateParenthesis
:type n: int :rtype: List[str]
022_generate_parentheses/generate_parentheses.py:2
Method
generatePossibleNextMoves
:type s: str :rtype: List[str]
293_flip_game/flip.py:2
Method
generateTrees
:type n: int :rtype: List[TreeNode]
095_unique_binary_search_trees_ii/unique_binary_search_trees_ii.py:9
Method
getDepth
(node)
222_count_complete_tree_nodes/count_complete_tree_nodes.py:12
Method
getFactors
:type n: int :rtype: List[List[int]]
254_factor_combinations/factor_combinations.py:3
Method
getHint
:type secret: str :type guess: str :rtype: str
299_bulls_and_cows/bulls_and_cows.py:5
Method
getIntersectionNode
(self, headA, headB)
160_intersection_of_linked_lists/intersection_of_two_linked_lists.py:4
Method
getIntervals
:rtype: List[Interval]
352_data_stream_disjoint_intervals/352.py:45
Method
getMin
(self)
155_min_stack/min_stack.py:32
Method
getNeighbours
(b, x, y)
289_game_of_life/game_of_life.py:9
Method
getNum
(m)
233_number_of_digit_one/number_of_digit_one.py:8
Method
getNumber
()
224_basic_calculator/basic_calculator.py:12
Method
getPermutation
:type n: int :type k: int :rtype: str
060_permutation_sequence/permutation_sequence.py:2
Method
getRow
:type rowIndex: int :rtype: List[int]
119_pascal_triangle_ii/pascal_triangle_ii.py:2
Method
getSkyline
:type buildings: List[List[int]] :rtype: List[List[int]]
218_skyline_problem/skyline_take2.py:2
Method
getSkyline
(self, buildings)
218_skyline_problem/skyline.py:14
Method
get_balance
(node)
110_balanced_binary_treee/balanced_binary_tree.py:6
Method
get_max_rob
(idx, droplast=False)
213_house_robber_ii/house_robber_ii.py:10
Method
get_max_rob
(idx)
198_house_robber/house_robber.py:10
Method
get_min
(row, col)
120_triangle/triangle.py:6
Method
get_number
(i)
227_basic_calculator_ii/basic_calculator_ii_take2.py:7
Method
getways
(m)
070_climbing_stairs/climb_stairs.py:6
Method
grayCode
:type n: int :rtype: List[int]
089_gray_code/gray_code.py:2
Method
groupAnagrams
:type strs: List[str] :rtype: List[List[str]]
049_group_anagrams/group_anagrams.py:2
Method
groupStrings
:type strings: List[str] :rtype: List[List[str]]
249_group_shifted_strings/group_shifted_strings.py:3
Method
hIndex
:type citations: List[int] :rtype: int
275_hindex_ii/h_index_ii.py:2
Method
hIndex
:type citations: List[int] :rtype: int
275_hindex_ii/h_index_ii_take2.py:2
Method
hIndex
:type citations: List[int] :rtype: int
274_h_index/h_index.py:2
Method
hammingWeight
(self, n)
191_number_of_i_bits/number_of_one_bits.py:4
Method
hasCycle
:type head: ListNode :rtype: bool
141_linked_list_cycle/linked_list_cycle.py:8
Method
hasNext
(self)
173_binary_tree_iterator/binary_search_tree_iterator.py:32
Method
hasNext
:rtype: bool
173_binary_tree_iterator/binary_search_tree_iterator_take2.py:20
Method
hasNext
:rtype: bool
251_flatten_2d_vector/flatten.py:39
Method
hasNext
:rtype: bool
341_flatten_nested_list_iterator/flatten.py:55
Method
hasPathSum
(self, root, sum)
112_path_sum/path_sum.py:5
Method
inorderSuccessor
:type root: TreeNode :type p: TreeNode :rtype: TreeNode
285_inorder_successor_in_BST/successor.py:9
Method
inorderTraversal
:type root: TreeNode :rtype: List[int]
094_binary_tree_inorder/binary_tree_inorder_traversal.py:9
Method
intToRoman
:type num: int :rtype: str
012_integer_to_roman/integer_to_roman.py:2
Method
integerBreak
:type n: int :rtype: int
343_integer_break/break.py:2
Method
invertTree
(self, root)
226_invert_binary_tree/invert_binary_tree.py:7
Method
isAdditiveNumber
:type num: str :rtype: bool
306_additive_number/additive.py:2
Method
isAnagram
(self, s, t)
242_valid_anagram/valid_anagram.py:6
Method
isBalanced
(self, root)
110_balanced_binary_treee/balanced_binary_tree.py:4
Method
isHappy
(self, n)
202_happy_number/happy_number.py:4
Method
isInterleave
(self, s1, s2, s3)
097_interleaving_string/interleaving_dp.py:7
Method
isIsomorphic
(self, s, t)
205_isomorphic_strings/isomorphic_strings.py:5
Method
isMatch
:type s: str :type p: str :rtype: bool
010_regular_expression_matching/regular_expression_matching.py:2
Method
isMatch
:type s: str :type p: str :rtype: bool
044_wildcard_matching/wildcard_matching.py:4
Method
isMatch
:type s: str :type p: str :rtype: bool
044_wildcard_matching/wildcard_matching_TLE.py:4
Method
isNumber
:type s: str :rtype: bool
065_valid_number/valid_number.py:2
Method
isOneEditDistance
:type s: str :type t: str :rtype: bool
161_one_edit_distance/one_edit_distance.py:2
Method
isPalindrome
:type x: int :rtype: bool
009_palindrome_number/palindrome_number.py:2
Method
isPalindrome
(self, s)
125_valid_palindrome/valid_palindrome.py:9
Method
isPalindrome
:type head: ListNode :rtype: bool
234_palindrome_linked_list/panlindrome_reverse.py:8
Method
isPalindrome
(self, head)
234_palindrome_linked_list/panlindrome.py:10
Method
isPowerOfFour
:type num: int :rtype: bool
342_power_of_four/power_of_4.py:2
Method
isPowerOfThree
:type n: int :rtype: bool
326_power_of_three/power_of_three.py:2
Method
isPowerOfTwo
(self, n)
231_power_of_two/power_of_two.py:7
Method
isSameTree
(self, p, q)
100_same_tree/same_tree.py:5
Method
isSelfCrossing
:type x: List[int] :rtype: bool
335_self_crossing/self_crossing.py:2
Method
isStrobogrammatic
:type num: str :rtype: bool
246_strobogrammatic_number/strobo.py:2
Method
isSymmetric
:type root: TreeNode :rtype: bool
101_symmetric_tree/symmetric_tree.py:2
Method
isUgly
:type num: int :rtype: bool
263_ugly_number/ugly_number.py:2
Method
isUnique
check if a word is unique. :type word: str :rtype: bool
288_unique_word_abbrevation/abbr.py:20
Method
isValid
:type s: str :rtype: bool
020_valid_parentheses/valid_parentheses.py:2
Method
isValidBST
:type root: TreeNode :rtype: bool
098_validate_binary_search_tree/validate_binary_search_tree.py:9
Function
isValidSudoku
:type board: List[List[str]] :rtype: bool
036_valid_sudoku/valid_sudoku.py:2
Method
jump
:type nums: List[int] :rtype: int
045_jump_game_ii/jump_game_ii.py:2
Method
kthSmallest
:type root: TreeNode :type k: int :rtype: int
230_kth_smallest_element/kth.py:9
Method
ladderLength
:type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int
127_word_ladder/word_ladder.py:3
Method
ladderLength
:type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int
127_word_ladder/word_ladder_TLE.py:2
Method
largestBSTSubtree
:type root: TreeNode :rtype: int
333_largest_BST_subtree/largest.py:9
Method
largestNumber
(self, nums)
179_largest_number/largest_number_cmp.py:5
Method
largestNumber
(self, nums)
179_largest_number/largest_number.py:4
Method
largestRectangleArea
:type heights: List[int] :rtype: int
084_largest_rectangle_in_histogram/largest_rectangle_in_histogram.py:17
Method
largestRectangleArea
(self, height)
084_largest_rectangle_in_histogram/largest_rectangle.py:4
Method
len
(node)
160_intersection_of_linked_lists/intersection_of_two_linked_lists.py:5
Method
lengthOfLIS
:type nums: List[int] :rtype: int
300_longest_increasing_subsequence/longest.py:2
Method
lengthOfLastWord
(self, s)
058_length_of_last_word/len_of_last_word.py:4
Method
lengthOfLongestSubstringKDistinct
:type s: str :type k: int :rtype: int
340_longest_substr_at_most_k_chars/longest.py:4
Method
lengthOfLongestSubstringTwoDistinct
:type s: str :rtype: int
159_longest_substring_with_at_most_2_chars/longest_substring.py:2
Method
letterCombinations
:type digits: str :rtype: List[str]
017_letter_combinations_of_phone_number/letter_combination_of_phone_number.py:2
← previous
next →
301–400 of 604, ranked by callers