MCPcopy Create free account

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

Functions604 in github.com/RealHacker/leetcode-solutions

MethodlevelOrder
(self, root)
102_binary_tree_level_order_traversal/binary_tree_level_order_traversal.py:11
MethodlevelOrderBottom
:type root: TreeNode :rtype: List[List[int]]
107_binary_tree_level_order_traversal_ii/binary_tree_level_order_traversal_ii.py:9
Methodlistfind
(self, l, element)
227_basic_calculator_ii/basic_calculator_ii.py:4
FunctionlongestCommonPrefix
(self, strs)
014_longest_common_prefix/simple.py:1
MethodlongestCommonPrefix
:type strs: List[str] :rtype: str
014_longest_common_prefix/longest_common_prefix.py:2
MethodlongestConsecutive
:type root: TreeNode :rtype: int
298_binary_tree_longest_sequence/longest.py:9
MethodlongestConsecutive
:type nums: List[int] :rtype: int
128_longest_consequetive_sequence/longest_consequtive_sequence.py:4
MethodlongestIncreasingPath
:type matrix: List[List[int]] :rtype: int
329_longest_increasing_path/longest_increasing_path.py:3
MethodlongestPalindrome
:type s: str :rtype: str
005_longest_palindromic_substring/longest_panlindromic_string_TE.py:3
MethodlongestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses_wrong.py:2
MethodlongestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses_TE.py:2
MethodlongestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses.py:2
MethodlowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
235_lowst_common_ancestor_bst/lowest_common_ancestor_binary_tree.py:2
MethodlowestCommonAncestor
(self, root, p, q)
236_lowest_common_ancestor/lowest_common_ancestor.py:6
MethodlowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
236_lowest_common_ancestor/lowest_common_ancestor_complex.py:9
MethodmajorityElement
(self, nums)
169_majority_element/majority_element.py:5
MethodmajorityElement
(self, nums)
229_majority_element_ii/majority_element_ii.py:5
Functionmake_tree
(_list)
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_take2.py:29
MethodmaxArea
:type height: List[int] :rtype: int
011_container_with_most_water/container_with_most_water.py:2
MethodmaxArea
:type height: List[int] :rtype: int
011_container_with_most_water/container_with_most-water_NxN.py:2
MethodmaxCoins
:type nums: List[int] :rtype: int
312_burst_balloons/burst.py:2
MethodmaxDepth
(self, root)
104_max_depth_of_binary_tree/max_depth_of_binary_tree.py:11
MethodmaxNumber
:type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int]
321_create_maximum_number/create_maximum_number_TLE.py:2
MethodmaxNumber
:type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int]
321_create_maximum_number/create_maximum_number.py:15
MethodmaxNumber
:type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int]
321_create_maximum_number/create_maximum_number_TLE_take2.py:18
MethodmaxPathSum
:type root: TreeNode :rtype: int
124_binary_tree_max_path_sum/binary_tree_max_path_sum.py:9
MethodmaxPoints
:type points: List[Point] :rtype: int
149_max_points_on_a_line/max_points_on_a_line.py:9
MethodmaxProduct
:type words: List[str] :rtype: int
318_maximum_product_of_word_lengths/maximum_product_of_word_lengths.py:3
MethodmaxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maximum_products_subarray.py:3
MethodmaxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maximum_products_subarray_recurse.py:3
MethodmaxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maxproduct.py:2
MethodmaxProfit
:type prices: List[int] :rtype: int
309_best_time_to_buy_cooldown/best_time.py:2
MethodmaxProfit
:type prices: List[int] :rtype: int
309_best_time_to_buy_cooldown/best_time_TLE.py:2
MethodmaxProfit
:type prices: List[int] :rtype: int
121_best_time_to_buy_and_sell/best_time_to_buy_and_sell.py:2
MethodmaxProfit
:type prices: List[int] :rtype: int
122_best_time_to_buy_adn_sell_ii/best_time_to_buy_and_sell_ii.py:2
MethodmaxProfit
:type k: int :type prices: List[int] :rtype: int
188_best_time_to_buy_and_sell_iv/bestime.py:2
MethodmaxSlidingWindow
(self, nums, k)
239_sliding_window_maximum/sliding_window_maximum.py:9
MethodmaxSlidingWindow
:type nums: List[int] :type k: int :rtype: List[int]
239_sliding_window_maximum/sliding.py:2
MethodmaxSubArray
:type nums: List[int] :rtype: int
053_maximum_subarray/maximum_subarray.py:2
MethodmaxSubArrayLen
:type nums: List[int] :type k: int :rtype: int
325_maximum_size_subarray/max.py:3
MethodmaximalRectangle
:type matrix: List[List[str]] :rtype: int
085_maximal_rectangle/maximal_rectangle.py:2
MethodmaximalSquare
(self, matrix)
221_maximal_square/maximal_square.py:4
MethodmaximumGap
:type nums: List[int] :rtype: int
164_maximum_gap/maximum_gap.py:2
Methodmerge
(self, nums1, m, nums2, n)
088_merge_sorted_arry/merge_sorted_array.py:8
Methodmerge
:type intervals: List[Interval] :rtype: List[Interval]
056_merge_intervals/merge_intervals.py:4
MethodmergeKLists
:type lists: List[ListNode] :rtype: ListNode
023_merge_k_sorted_lists/merge_k_lists.py:2
MethodmergeTwoLists
:type l1: ListNode :type l2: ListNode :rtype: ListNode
021_merge_2_sorted_lists/merge_2_sorted_lists.py:8
MethodminArea
:type image: List[List[str]] :type x: int :type y: int :rtype: int
302_smallest_rectangle_enclosing_pixels/smallest.py:2
MethodminArea
:type image: List[List[str]] :type x: int :type y: int :rtype: int
302_smallest_rectangle_enclosing_pixels/smallest_binary_search.py:3
MethodminCost
:type costs: List[List[int]] :rtype: int
256_paint_house/paint_house.py:3
MethodminCostII
:type costs: List[List[int]] :rtype: int
265_paint_house_ii/paint_house_ii.py:3
MethodminCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_ii.py:2
MethodminCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_ii_TLE.py:2
MethodminCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_N2.py:2
MethodminDepth
(self, root)
111_minimum_depth_of_bst/minimum_depth_of_binary_tree.py:4
MethodminDistance
:type word1: str :type word2: str :rtype: int
072_edit_distance/edit_distance.py:2
MethodminMeetingRooms
:type intervals: List[Interval] :rtype: int
253_meeting_room_ii/meeting_room_ii.py:8
MethodminPatches
:type nums: List[int] :type n: int :rtype: int
330_patching_array/patching.py:2
MethodminPathSum
:type grid: List[List[int]] :rtype: int
064_minimum_path_sum/minimum_path_sum.py:3
MethodminSubArrayLen
:type s: int :type nums: List[int] :rtype: int
209_minium_size_subarray_sum/minimum_size_subarray_sum.py:2
MethodminTotalDistance
:type grid: List[List[int]] :rtype: int
296_best_meeting_point/meetingpoint.py:2
MethodminWindow
:type s: str :type t: str :rtype: str
076_min_window_substring/min_window_substring_TLE.py:4
MethodminimumTotal
(self, triangle)
120_triangle/triangle.py:4
MethodmissingNumber
:type nums: List[int] :rtype: int
268_missing_number/missing_number.py:2
MethodmoveZeroes
:type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead.
283_move_zeros/move_zeros.py:2
Methodmultiply
:type A: List[List[int]] :type B: List[List[int]] :rtype: List[List[int]]
311_sparse_matrix_multiplication/multiply.py:2
Methodmultiply
:type num1: str :type num2: str :rtype: str
043_multiply_strings/multiply_strings.py:2
MethodmyAtoi
:type str: str :rtype: int
008_string_to_integer/atoi.py:3
MethodmyPow
:type x: float :type n: int :rtype: float
050_pow_x_n/powx_n.py:2
MethodmySqrt
:type x: int :rtype: int
069_sqrt_x/sqrt.py:2
Methodncmp
(s1, s2)
179_largest_number/largest_number.py:5
Methodnext
:rtype: int
281_zigzag_iterator/iterator.py:13
Methodnext
(self)
173_binary_tree_iterator/binary_search_tree_iterator.py:36
Methodnext
:rtype: int
173_binary_tree_iterator/binary_search_tree_iterator_take2.py:26
Methodnext
:rtype: int
251_flatten_2d_vector/flatten.py:28
Methodnext
:rtype: int
341_flatten_nested_list_iterator/flatten.py:45
MethodnextPermutation
:type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead.
031_next_permutation/next_permutation.py:2
MethodnthSuperUglyNumber
:type n: int :type primes: List[int] :rtype: int
313_super_ugly_number/super_ugly.py:3
MethodnthUglyNumber
:type n: int :rtype: int
264_ugly_number_ii/ugly_number_ii.py:2
MethodnumDecodings
(self, s)
091_decode_ways/decode_ways.py:4
MethodnumIslands2
:type m: int :type n: int :type positions: List[List[int]] :rtype: List[int]
305_number_of_islands_ii/islands.py:2
MethodnumSquares
:type n: int :rtype: int
279_perfect_square_numbers/perfect_squares.py:3
MethodnumTrees
:type n: int :rtype: int
096_unique_binary_search_trees/unique_binary_search_trees.py:2
MethodnumWays
:type n: int :type k: int :rtype: int
276_paint_fence/paint.py:2
MethodnumberToWords
:type num: int :rtype: str
273_english_words/integer_to_english.py:2
MethododdEvenList
:type head: ListNode :rtype: ListNode
328_odd_even_linked_list/odd_even_linked_list.py:8
MethodpalindromePairs
:type words: List[str] :rtype: List[List[int]]
336_palindrome_pairs/palindrome_pairs.py:2
Methodpartition
:type s: str :rtype: List[List[str]]
131_palindrome_partitioning/palindrome_partitioning.py:2
Methodpartition
:type head: ListNode :type x: int :rtype: ListNode
086_partition_list/partition_list.py:8
MethodpathSum
:type root: TreeNode :type sum: int :rtype: List[List[int]]
113_path_sum_ii/path_sum_ii.py:9
Methodpeek
Returns the next element in the iteration without advancing the iterator. :rtype: int
284_peeking_iterator/peeking_iterator.py:31
Methodpeek
(self)
232_make_queue_using_stacks/queue_using_stacks.py:27
Methodpermute
(self, nums)
046_permutations/permutations.py:2
MethodpermuteUnique
:type nums: List[int] :rtype: List[List[int]]
047_permutations_ii/permutations_ii.py:3
MethodplusOne
:type digits: List[int] :rtype: List[int]
066_plus_one/plus_one.py:2
Methodpoint_cmp
(x, y)
218_skyline_problem/skyline.py:37
MethodpostorderTraversal
:type root: TreeNode :rtype: List[int]
145_binary_tree_postorder_traversal/binary_tree_postorder.py:9
MethodpostorderTraversal
:type root: TreeNode :rtype: List[int]
145_binary_tree_postorder_traversal/binary_tree_postorder_nondestructive.py:2
MethodpreorderTraversal
(self, root)
144_binary_tree_preorder_traversal/binary_tree_preorder_loop.py:11
MethodproductExceptSelf
:type nums: List[int] :rtype: List[int]
238_product_array/product_of_array_except_self_take2.py:2
← previousnext →401–500 of 604, ranked by callers