MCPcopy Create free account

hub / github.com/RealHacker/leetcode-solutions / functions

Functions604 in github.com/RealHacker/leetcode-solutions

MethodfindRepeatedDnaSequences
(self, s)
187_repeated_dna/repeated_dna_sequences.py:5
MethodfindStrobogrammatic
:type n: int :rtype: List[str]
247_strobogrammatic_number_ii/strobo.py:3
MethodfindSubstring
:type s: str :type words: List[str] :rtype: List[int]
030_substring_with_cancatenation_all_words/substring_concat_all_words.py:2
MethodfindSubstring
:type s: str :type words: List[str] :rtype: List[int]
030_substring_with_cancatenation_all_words/substring_concat_all_words_TLE.py:2
MethodfindWords
:type board: List[List[str]] :type words: List[str] :rtype: List[str]
212_word_search_ii/wordsearch.py:2
MethodfirstBadVersion
:type n: int :rtype: int
278_first_bad_version/first_bad_version.py:7
MethodfirstMissingPositive
:type nums: List[int] :rtype: int
041_first_missing_positive/first_missing_positive.py:2
Methodflatten
: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
Methodflatten
: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
MethodfourSum
:type nums: List[int] :type target: int :rtype: List[List[int]]
018_four_sum/four_sum.py:27
MethodfractionToDecimal
(self, numerator, denominator)
166_fraction_to_recurring_decimal/fraction_to_decimal.py:5
MethodfractionToDecimal
:type numerator: int :type denominator: int :rtype: str
166_fraction_to_recurring_decimal/fraction_to_decimal_take2.py:2
MethodfullJustify
:type words: List[str] :type maxWidth: int :rtype: List[str]
068_text_justification/text_justification.py:2
MethodgameOfLife
: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
Methodgenerate
(self, numRows)
118_pascal_triangle/pascal_triangle.py:4
MethodgenerateAbbreviations
:type word: str :rtype: List[str]
320_generalized_abbreviation/abbreviation.py:2
MethodgenerateMatrix
:type n: int :rtype: List[List[int]]
059_spiral_matrix_ii/spiral_matrix.py:2
MethodgeneratePalindromes
:type s: str :rtype: List[str]
267_palindrome_permutation_ii/permutations.py:4
MethodgenerateParenthesis
:type n: int :rtype: List[str]
022_generate_parentheses/generate_parentheses.py:2
MethodgeneratePossibleNextMoves
:type s: str :rtype: List[str]
293_flip_game/flip.py:2
MethodgenerateTrees
:type n: int :rtype: List[TreeNode]
095_unique_binary_search_trees_ii/unique_binary_search_trees_ii.py:9
MethodgetDepth
(node)
222_count_complete_tree_nodes/count_complete_tree_nodes.py:12
MethodgetFactors
:type n: int :rtype: List[List[int]]
254_factor_combinations/factor_combinations.py:3
MethodgetHint
:type secret: str :type guess: str :rtype: str
299_bulls_and_cows/bulls_and_cows.py:5
MethodgetIntersectionNode
(self, headA, headB)
160_intersection_of_linked_lists/intersection_of_two_linked_lists.py:4
MethodgetIntervals
:rtype: List[Interval]
352_data_stream_disjoint_intervals/352.py:45
MethodgetMin
(self)
155_min_stack/min_stack.py:32
MethodgetNeighbours
(b, x, y)
289_game_of_life/game_of_life.py:9
MethodgetNum
(m)
233_number_of_digit_one/number_of_digit_one.py:8
MethodgetNumber
()
224_basic_calculator/basic_calculator.py:12
MethodgetPermutation
:type n: int :type k: int :rtype: str
060_permutation_sequence/permutation_sequence.py:2
MethodgetRow
:type rowIndex: int :rtype: List[int]
119_pascal_triangle_ii/pascal_triangle_ii.py:2
MethodgetSkyline
:type buildings: List[List[int]] :rtype: List[List[int]]
218_skyline_problem/skyline_take2.py:2
MethodgetSkyline
(self, buildings)
218_skyline_problem/skyline.py:14
Methodget_balance
(node)
110_balanced_binary_treee/balanced_binary_tree.py:6
Methodget_max_rob
(idx, droplast=False)
213_house_robber_ii/house_robber_ii.py:10
Methodget_max_rob
(idx)
198_house_robber/house_robber.py:10
Methodget_min
(row, col)
120_triangle/triangle.py:6
Methodget_number
(i)
227_basic_calculator_ii/basic_calculator_ii_take2.py:7
Methodgetways
(m)
070_climbing_stairs/climb_stairs.py:6
MethodgrayCode
:type n: int :rtype: List[int]
089_gray_code/gray_code.py:2
MethodgroupAnagrams
:type strs: List[str] :rtype: List[List[str]]
049_group_anagrams/group_anagrams.py:2
MethodgroupStrings
:type strings: List[str] :rtype: List[List[str]]
249_group_shifted_strings/group_shifted_strings.py:3
MethodhIndex
:type citations: List[int] :rtype: int
275_hindex_ii/h_index_ii.py:2
MethodhIndex
:type citations: List[int] :rtype: int
275_hindex_ii/h_index_ii_take2.py:2
MethodhIndex
:type citations: List[int] :rtype: int
274_h_index/h_index.py:2
MethodhammingWeight
(self, n)
191_number_of_i_bits/number_of_one_bits.py:4
MethodhasCycle
:type head: ListNode :rtype: bool
141_linked_list_cycle/linked_list_cycle.py:8
MethodhasNext
(self)
173_binary_tree_iterator/binary_search_tree_iterator.py:32
MethodhasNext
:rtype: bool
173_binary_tree_iterator/binary_search_tree_iterator_take2.py:20
MethodhasNext
:rtype: bool
251_flatten_2d_vector/flatten.py:39
MethodhasNext
:rtype: bool
341_flatten_nested_list_iterator/flatten.py:55
MethodhasPathSum
(self, root, sum)
112_path_sum/path_sum.py:5
MethodinorderSuccessor
:type root: TreeNode :type p: TreeNode :rtype: TreeNode
285_inorder_successor_in_BST/successor.py:9
MethodinorderTraversal
:type root: TreeNode :rtype: List[int]
094_binary_tree_inorder/binary_tree_inorder_traversal.py:9
MethodintToRoman
:type num: int :rtype: str
012_integer_to_roman/integer_to_roman.py:2
MethodintegerBreak
:type n: int :rtype: int
343_integer_break/break.py:2
MethodinvertTree
(self, root)
226_invert_binary_tree/invert_binary_tree.py:7
MethodisAdditiveNumber
:type num: str :rtype: bool
306_additive_number/additive.py:2
MethodisAnagram
(self, s, t)
242_valid_anagram/valid_anagram.py:6
MethodisBalanced
(self, root)
110_balanced_binary_treee/balanced_binary_tree.py:4
MethodisHappy
(self, n)
202_happy_number/happy_number.py:4
MethodisInterleave
(self, s1, s2, s3)
097_interleaving_string/interleaving_dp.py:7
MethodisIsomorphic
(self, s, t)
205_isomorphic_strings/isomorphic_strings.py:5
MethodisMatch
:type s: str :type p: str :rtype: bool
010_regular_expression_matching/regular_expression_matching.py:2
MethodisMatch
:type s: str :type p: str :rtype: bool
044_wildcard_matching/wildcard_matching.py:4
MethodisMatch
:type s: str :type p: str :rtype: bool
044_wildcard_matching/wildcard_matching_TLE.py:4
MethodisNumber
:type s: str :rtype: bool
065_valid_number/valid_number.py:2
MethodisOneEditDistance
:type s: str :type t: str :rtype: bool
161_one_edit_distance/one_edit_distance.py:2
MethodisPalindrome
:type x: int :rtype: bool
009_palindrome_number/palindrome_number.py:2
MethodisPalindrome
(self, s)
125_valid_palindrome/valid_palindrome.py:9
MethodisPalindrome
:type head: ListNode :rtype: bool
234_palindrome_linked_list/panlindrome_reverse.py:8
MethodisPalindrome
(self, head)
234_palindrome_linked_list/panlindrome.py:10
MethodisPowerOfFour
:type num: int :rtype: bool
342_power_of_four/power_of_4.py:2
MethodisPowerOfThree
:type n: int :rtype: bool
326_power_of_three/power_of_three.py:2
MethodisPowerOfTwo
(self, n)
231_power_of_two/power_of_two.py:7
MethodisSameTree
(self, p, q)
100_same_tree/same_tree.py:5
MethodisSelfCrossing
:type x: List[int] :rtype: bool
335_self_crossing/self_crossing.py:2
MethodisStrobogrammatic
:type num: str :rtype: bool
246_strobogrammatic_number/strobo.py:2
MethodisSymmetric
:type root: TreeNode :rtype: bool
101_symmetric_tree/symmetric_tree.py:2
MethodisUgly
:type num: int :rtype: bool
263_ugly_number/ugly_number.py:2
MethodisUnique
check if a word is unique. :type word: str :rtype: bool
288_unique_word_abbrevation/abbr.py:20
MethodisValid
:type s: str :rtype: bool
020_valid_parentheses/valid_parentheses.py:2
MethodisValidBST
:type root: TreeNode :rtype: bool
098_validate_binary_search_tree/validate_binary_search_tree.py:9
FunctionisValidSudoku
:type board: List[List[str]] :rtype: bool
036_valid_sudoku/valid_sudoku.py:2
Methodjump
:type nums: List[int] :rtype: int
045_jump_game_ii/jump_game_ii.py:2
MethodkthSmallest
:type root: TreeNode :type k: int :rtype: int
230_kth_smallest_element/kth.py:9
MethodladderLength
:type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int
127_word_ladder/word_ladder.py:3
MethodladderLength
:type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int
127_word_ladder/word_ladder_TLE.py:2
MethodlargestBSTSubtree
:type root: TreeNode :rtype: int
333_largest_BST_subtree/largest.py:9
MethodlargestNumber
(self, nums)
179_largest_number/largest_number_cmp.py:5
MethodlargestNumber
(self, nums)
179_largest_number/largest_number.py:4
MethodlargestRectangleArea
:type heights: List[int] :rtype: int
084_largest_rectangle_in_histogram/largest_rectangle_in_histogram.py:17
MethodlargestRectangleArea
(self, height)
084_largest_rectangle_in_histogram/largest_rectangle.py:4
Methodlen
(node)
160_intersection_of_linked_lists/intersection_of_two_linked_lists.py:5
MethodlengthOfLIS
:type nums: List[int] :rtype: int
300_longest_increasing_subsequence/longest.py:2
MethodlengthOfLastWord
(self, s)
058_length_of_last_word/len_of_last_word.py:4
MethodlengthOfLongestSubstringKDistinct
:type s: str :type k: int :rtype: int
340_longest_substr_at_most_k_chars/longest.py:4
MethodlengthOfLongestSubstringTwoDistinct
:type s: str :rtype: int
159_longest_substring_with_at_most_2_chars/longest_substring.py:2
MethodletterCombinations
:type digits: str :rtype: List[str]
017_letter_combinations_of_phone_number/letter_combination_of_phone_number.py:2
← previousnext →301–400 of 604, ranked by callers