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
levelOrder
(self, root)
102_binary_tree_level_order_traversal/binary_tree_level_order_traversal.py:11
Method
levelOrderBottom
:type root: TreeNode :rtype: List[List[int]]
107_binary_tree_level_order_traversal_ii/binary_tree_level_order_traversal_ii.py:9
Method
listfind
(self, l, element)
227_basic_calculator_ii/basic_calculator_ii.py:4
Function
longestCommonPrefix
(self, strs)
014_longest_common_prefix/simple.py:1
Method
longestCommonPrefix
:type strs: List[str] :rtype: str
014_longest_common_prefix/longest_common_prefix.py:2
Method
longestConsecutive
:type root: TreeNode :rtype: int
298_binary_tree_longest_sequence/longest.py:9
Method
longestConsecutive
:type nums: List[int] :rtype: int
128_longest_consequetive_sequence/longest_consequtive_sequence.py:4
Method
longestIncreasingPath
:type matrix: List[List[int]] :rtype: int
329_longest_increasing_path/longest_increasing_path.py:3
Method
longestPalindrome
:type s: str :rtype: str
005_longest_palindromic_substring/longest_panlindromic_string_TE.py:3
Method
longestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses_wrong.py:2
Method
longestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses_TE.py:2
Method
longestValidParentheses
:type s: str :rtype: int
032_longest_valid_parentheses/longest_valid_parentheses.py:2
Method
lowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
235_lowst_common_ancestor_bst/lowest_common_ancestor_binary_tree.py:2
Method
lowestCommonAncestor
(self, root, p, q)
236_lowest_common_ancestor/lowest_common_ancestor.py:6
Method
lowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
236_lowest_common_ancestor/lowest_common_ancestor_complex.py:9
Method
majorityElement
(self, nums)
169_majority_element/majority_element.py:5
Method
majorityElement
(self, nums)
229_majority_element_ii/majority_element_ii.py:5
Function
make_tree
(_list)
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_take2.py:29
Method
maxArea
:type height: List[int] :rtype: int
011_container_with_most_water/container_with_most_water.py:2
Method
maxArea
:type height: List[int] :rtype: int
011_container_with_most_water/container_with_most-water_NxN.py:2
Method
maxCoins
:type nums: List[int] :rtype: int
312_burst_balloons/burst.py:2
Method
maxDepth
(self, root)
104_max_depth_of_binary_tree/max_depth_of_binary_tree.py:11
Method
maxNumber
:type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int]
321_create_maximum_number/create_maximum_number_TLE.py:2
Method
maxNumber
:type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int]
321_create_maximum_number/create_maximum_number.py:15
Method
maxNumber
: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
Method
maxPathSum
:type root: TreeNode :rtype: int
124_binary_tree_max_path_sum/binary_tree_max_path_sum.py:9
Method
maxPoints
:type points: List[Point] :rtype: int
149_max_points_on_a_line/max_points_on_a_line.py:9
Method
maxProduct
:type words: List[str] :rtype: int
318_maximum_product_of_word_lengths/maximum_product_of_word_lengths.py:3
Method
maxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maximum_products_subarray.py:3
Method
maxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maximum_products_subarray_recurse.py:3
Method
maxProduct
:type nums: List[int] :rtype: int
152_maximum_products_subarray/maxproduct.py:2
Method
maxProfit
:type prices: List[int] :rtype: int
309_best_time_to_buy_cooldown/best_time.py:2
Method
maxProfit
:type prices: List[int] :rtype: int
309_best_time_to_buy_cooldown/best_time_TLE.py:2
Method
maxProfit
:type prices: List[int] :rtype: int
121_best_time_to_buy_and_sell/best_time_to_buy_and_sell.py:2
Method
maxProfit
:type prices: List[int] :rtype: int
122_best_time_to_buy_adn_sell_ii/best_time_to_buy_and_sell_ii.py:2
Method
maxProfit
:type k: int :type prices: List[int] :rtype: int
188_best_time_to_buy_and_sell_iv/bestime.py:2
Method
maxSlidingWindow
(self, nums, k)
239_sliding_window_maximum/sliding_window_maximum.py:9
Method
maxSlidingWindow
:type nums: List[int] :type k: int :rtype: List[int]
239_sliding_window_maximum/sliding.py:2
Method
maxSubArray
:type nums: List[int] :rtype: int
053_maximum_subarray/maximum_subarray.py:2
Method
maxSubArrayLen
:type nums: List[int] :type k: int :rtype: int
325_maximum_size_subarray/max.py:3
Method
maximalRectangle
:type matrix: List[List[str]] :rtype: int
085_maximal_rectangle/maximal_rectangle.py:2
Method
maximalSquare
(self, matrix)
221_maximal_square/maximal_square.py:4
Method
maximumGap
:type nums: List[int] :rtype: int
164_maximum_gap/maximum_gap.py:2
Method
merge
(self, nums1, m, nums2, n)
088_merge_sorted_arry/merge_sorted_array.py:8
Method
merge
:type intervals: List[Interval] :rtype: List[Interval]
056_merge_intervals/merge_intervals.py:4
Method
mergeKLists
:type lists: List[ListNode] :rtype: ListNode
023_merge_k_sorted_lists/merge_k_lists.py:2
Method
mergeTwoLists
:type l1: ListNode :type l2: ListNode :rtype: ListNode
021_merge_2_sorted_lists/merge_2_sorted_lists.py:8
Method
minArea
:type image: List[List[str]] :type x: int :type y: int :rtype: int
302_smallest_rectangle_enclosing_pixels/smallest.py:2
Method
minArea
:type image: List[List[str]] :type x: int :type y: int :rtype: int
302_smallest_rectangle_enclosing_pixels/smallest_binary_search.py:3
Method
minCost
:type costs: List[List[int]] :rtype: int
256_paint_house/paint_house.py:3
Method
minCostII
:type costs: List[List[int]] :rtype: int
265_paint_house_ii/paint_house_ii.py:3
Method
minCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_ii.py:2
Method
minCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_ii_TLE.py:2
Method
minCut
:type s: str :rtype: int
132_palindrome_partitioning_ii/palindrome_partitioning_N2.py:2
Method
minDepth
(self, root)
111_minimum_depth_of_bst/minimum_depth_of_binary_tree.py:4
Method
minDistance
:type word1: str :type word2: str :rtype: int
072_edit_distance/edit_distance.py:2
Method
minMeetingRooms
:type intervals: List[Interval] :rtype: int
253_meeting_room_ii/meeting_room_ii.py:8
Method
minPatches
:type nums: List[int] :type n: int :rtype: int
330_patching_array/patching.py:2
Method
minPathSum
:type grid: List[List[int]] :rtype: int
064_minimum_path_sum/minimum_path_sum.py:3
Method
minSubArrayLen
:type s: int :type nums: List[int] :rtype: int
209_minium_size_subarray_sum/minimum_size_subarray_sum.py:2
Method
minTotalDistance
:type grid: List[List[int]] :rtype: int
296_best_meeting_point/meetingpoint.py:2
Method
minWindow
:type s: str :type t: str :rtype: str
076_min_window_substring/min_window_substring_TLE.py:4
Method
minimumTotal
(self, triangle)
120_triangle/triangle.py:4
Method
missingNumber
:type nums: List[int] :rtype: int
268_missing_number/missing_number.py:2
Method
moveZeroes
:type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead.
283_move_zeros/move_zeros.py:2
Method
multiply
:type A: List[List[int]] :type B: List[List[int]] :rtype: List[List[int]]
311_sparse_matrix_multiplication/multiply.py:2
Method
multiply
:type num1: str :type num2: str :rtype: str
043_multiply_strings/multiply_strings.py:2
Method
myAtoi
:type str: str :rtype: int
008_string_to_integer/atoi.py:3
Method
myPow
:type x: float :type n: int :rtype: float
050_pow_x_n/powx_n.py:2
Method
mySqrt
:type x: int :rtype: int
069_sqrt_x/sqrt.py:2
Method
ncmp
(s1, s2)
179_largest_number/largest_number.py:5
Method
next
:rtype: int
281_zigzag_iterator/iterator.py:13
Method
next
(self)
173_binary_tree_iterator/binary_search_tree_iterator.py:36
Method
next
:rtype: int
173_binary_tree_iterator/binary_search_tree_iterator_take2.py:26
Method
next
:rtype: int
251_flatten_2d_vector/flatten.py:28
Method
next
:rtype: int
341_flatten_nested_list_iterator/flatten.py:45
Method
nextPermutation
:type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead.
031_next_permutation/next_permutation.py:2
Method
nthSuperUglyNumber
:type n: int :type primes: List[int] :rtype: int
313_super_ugly_number/super_ugly.py:3
Method
nthUglyNumber
:type n: int :rtype: int
264_ugly_number_ii/ugly_number_ii.py:2
Method
numDecodings
(self, s)
091_decode_ways/decode_ways.py:4
Method
numIslands2
:type m: int :type n: int :type positions: List[List[int]] :rtype: List[int]
305_number_of_islands_ii/islands.py:2
Method
numSquares
:type n: int :rtype: int
279_perfect_square_numbers/perfect_squares.py:3
Method
numTrees
:type n: int :rtype: int
096_unique_binary_search_trees/unique_binary_search_trees.py:2
Method
numWays
:type n: int :type k: int :rtype: int
276_paint_fence/paint.py:2
Method
numberToWords
:type num: int :rtype: str
273_english_words/integer_to_english.py:2
Method
oddEvenList
:type head: ListNode :rtype: ListNode
328_odd_even_linked_list/odd_even_linked_list.py:8
Method
palindromePairs
:type words: List[str] :rtype: List[List[int]]
336_palindrome_pairs/palindrome_pairs.py:2
Method
partition
:type s: str :rtype: List[List[str]]
131_palindrome_partitioning/palindrome_partitioning.py:2
Method
partition
:type head: ListNode :type x: int :rtype: ListNode
086_partition_list/partition_list.py:8
Method
pathSum
:type root: TreeNode :type sum: int :rtype: List[List[int]]
113_path_sum_ii/path_sum_ii.py:9
Method
peek
Returns the next element in the iteration without advancing the iterator. :rtype: int
284_peeking_iterator/peeking_iterator.py:31
Method
peek
(self)
232_make_queue_using_stacks/queue_using_stacks.py:27
Method
permute
(self, nums)
046_permutations/permutations.py:2
Method
permuteUnique
:type nums: List[int] :rtype: List[List[int]]
047_permutations_ii/permutations_ii.py:3
Method
plusOne
:type digits: List[int] :rtype: List[int]
066_plus_one/plus_one.py:2
Method
point_cmp
(x, y)
218_skyline_problem/skyline.py:37
Method
postorderTraversal
:type root: TreeNode :rtype: List[int]
145_binary_tree_postorder_traversal/binary_tree_postorder.py:9
Method
postorderTraversal
:type root: TreeNode :rtype: List[int]
145_binary_tree_postorder_traversal/binary_tree_postorder_nondestructive.py:2
Method
preorderTraversal
(self, root)
144_binary_tree_preorder_traversal/binary_tree_preorder_loop.py:11
Method
productExceptSelf
:type nums: List[int] :rtype: List[int]
238_product_array/product_of_array_except_self_take2.py:2
← previous
next →
401–500 of 604, ranked by callers