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
↓ 1 callers
Method
numDistinct
(self, s, t)
115_distinct_subsequences/distinct_subsequences.py:6
↓ 1 callers
Method
numbersWithDigits
(self, n)
248_strobogrammatic_number_iii/strobo.py:78
↓ 1 callers
Method
partition
(self, nums, head, tail)
324_wiggle_sort_ii/wiggle2_TLE2.py:2
↓ 1 callers
Method
pick_permutation
(self, current, m, n)
097_interleaving_string/interleaving_naive.py:26
↓ 1 callers
Method
pickone
(self, nums, memo)
179_largest_number/largest_number_take1.py:15
↓ 1 callers
Method
postorder_visit
(self, node)
099_recover_binary_search_tree/recover_binary_search_tree.py:44
↓ 1 callers
Method
preorder_visit
(self, node)
099_recover_binary_search_tree/recover_binary_search_tree.py:27
↓ 1 callers
Method
printNode
(self)
147_insertion_sort_list/insertion_sort_list.py:7
↓ 1 callers
Method
recurse
(self, node, lvl)
107_binary_tree_level_order_traversal_ii/binary_tree_level_order_traversal_ii.py:18
↓ 1 callers
Method
recurse
(self, idx, state, price)
309_best_time_to_buy_cooldown/best_time_TLE.py:10
↓ 1 callers
Method
recurse
(self, i, j)
132_palindrome_partitioning_ii/palindrome_partitioning_ii.py:20
↓ 1 callers
Method
recurse
(self, nums)
108_sorted_array_to_bst/sorted_array_to_bst.py:17
↓ 1 callers
Method
recurse
(self, n, N)
247_strobogrammatic_number_ii/strobo.py:10
↓ 1 callers
Method
recurse
(self, i, j, k)
321_create_maximum_number/create_maximum_number_TLE_take2.py:41
↓ 1 callers
Method
recurse
(self, n)
254_factor_combinations/factor_combinations.py:11
↓ 1 callers
Method
recurse
(self, ll, weight)
339_nested_list_weighted_sum/weight_sum.py:34
↓ 1 callers
Method
recurse
(self, node)
148_sort_list/sort_list.py:11
↓ 1 callers
Method
recurse
(self, tmap, start, it)
332_reconstruct_itinerary/332_reconstruct_itinerary.py:19
↓ 1 callers
Method
recurse
(self, n)
279_perfect_square_numbers/perfect_squares.py:19
↓ 1 callers
Method
recurse
(self, node, depth, val)
298_binary_tree_longest_sequence/longest.py:20
↓ 1 callers
Method
recurse
(self, node)
116_populating_next_right_pointers_in_each_node/populating_next_right_pointers.py:19
↓ 1 callers
Method
recurse
(self, s,p, smap, pmap)
044_wildcard_matching/wildcard_matching_TLE.py:23
↓ 1 callers
Method
recurse
(self, word)
320_generalized_abbreviation/abbreviation.py:11
↓ 1 callers
Method
recurse
(self, word, d, last)
079_word_search/word_search_TLE.py:25
↓ 1 callers
Method
recurse
(self, word, d, last)
079_word_search/word_search.py:25
↓ 1 callers
Method
recurse
(self, node)
124_binary_tree_max_path_sum/binary_tree_max_path_sum.py:17
↓ 1 callers
Method
recurse
(self, inleft, inright, postleft, postright)
106_construct_bt_from_postorder_inorder/construct_binary_tree_from_inorder_postorder.py:19
↓ 1 callers
Method
recurse
(self, nums, k)
077_combinations/combinations.py:11
↓ 1 callers
Method
recurse
(self, start, end)
282_expression_add_operators/expression_add_operators_TLE.py:38
↓ 1 callers
Method
recurse
(self, start, end)
282_expression_add_operators/expression_add_operators.py:37
↓ 1 callers
Method
recurse
(self, lo, hi)
327_count_of_range_sum/count_of_range_sum.py:18
↓ 1 callers
Method
recurse
(self, root)
117_populating_next_right_pointers_in_each_node_ii/populating_next_right_ii.py:20
↓ 1 callers
Method
recurse
(self, root)
156_binary_tree_upside_down/binary_tree_upside_down.py:18
↓ 1 callers
Method
recurse
(self, node)
333_largest_BST_subtree/largest.py:19
↓ 1 callers
Method
recurse
(self, num, triples)
306_additive_number/additive.py:9
↓ 1 callers
Method
recurse
(self, n)
322_coin_change/coin_change_TLE.py:14
↓ 1 callers
Method
recurse
(self, root)
098_validate_binary_search_tree/validate_binary_search_tree.py:19
↓ 1 callers
Method
recurse
(self, node, lvl)
103_binary_tree_zigzag_level_order_traversal/binary_tree_zigzag_level_order_traversal.py:23
↓ 1 callers
Method
recurse
(self, i1, i2)
072_edit_distance/edit_distance.py:13
↓ 1 callers
Method
recurse
(self, counter, partial, last=None)
047_permutations_ii/permutations_ii.py:14
↓ 1 callers
Method
recurse
(self, root)
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_TLE.py:11
↓ 1 callers
Method
recurse
(self, s, chrs)
316_remove_duplicate_letters/remove_duplicate_letters_TLE.py:17
↓ 1 callers
Method
recurse
(self, node, n, depth)
314_binary_tree_vertical_order_traversal/traversal.py:29
↓ 1 callers
Method
recurse
(self, s)
294_flip_game_ii/flip.py:10
↓ 1 callers
Method
recurse
(self, start_index, color)
265_paint_house_ii/paint_house_ii.py:19
↓ 1 callers
Method
recurse
(self, s, wordDict)
140_word_break_ii/word_break_ii_TLE.py:14
↓ 1 callers
Method
recurse
(self, node, sum, partial)
113_path_sum_ii/path_sum_ii.py:19
↓ 1 callers
Method
recurse
(self, n, k)
276_paint_fence/paint.py:11
↓ 1 callers
Method
recurse
(self, k, n, current, last)
216_combination_sum_iii/combination_sum_iii.py:13
↓ 1 callers
Method
recurse_times
(self, start, end)
282_expression_add_operators/expression_add_operators_TLE.py:22
↓ 1 callers
Method
recurse_times
(self, start, end)
282_expression_add_operators/expression_add_operators.py:21
↓ 1 callers
Method
reset_visited
(self)
212_word_search_ii/wordsearch.py:30
↓ 1 callers
Method
reverseGroup
(self, head, ptr)
025_reverse_nodes_in_k_group/reverse_nodes_in_k_group.py:34
↓ 1 callers
Method
search
(self, nums, target)
033_search_in_rotated_sorted_array/search_in_rorated_array.py:6
↓ 1 callers
Method
sink
(self, grid, i, j)
200_islands/number_of_islands.py:15
↓ 1 callers
Method
solve
(self, k)
037_sodoku_solver/sodoku_solver.py:16
↓ 1 callers
Method
sortList
:type head: ListNode :rtype: ListNode
148_sort_list/sort_list.py:2
↓ 1 callers
Method
sub
(self, nums)
046_permutations/permutations.py:9
↓ 1 callers
Method
threeSum
:type nums: List[int] :rtype: List[List[int]]
018_four_sum/four_sum.py:2
↓ 1 callers
Method
traverse
(self, node)
133_clone_graph/clone_graph.py:15
↓ 1 callers
Method
traverse
(self, s, idx)
140_word_break_ii/word_break_ii.py:36
↓ 1 callers
Method
traverse
(self, s)
139_word_break/word_break.py:12
↓ 1 callers
Method
visit
(self, left, right)
241_different_ways_to_add_parenthesis/different_ways_to_add_parenthesis.py:15
↓ 1 callers
Method
visit
(self, node, lvl)
199_binary_tree_right_view/binary_tree_rightside_view.py:22
↓ 1 callers
Method
visit
(self, node, current)
257_binary_tree_paths/binary_tree_paths.py:18
↓ 1 callers
Method
visit
(self, node)
235_lowst_common_ancestor_bst/lowest_common_ancestor_binary_tree.py:14
↓ 1 callers
Method
visit
(self, node, depth)
222_count_complete_tree_nodes/count_complete_tree_nodes_take2.py:30
↓ 1 callers
Method
visit
(self, node)
236_lowest_common_ancestor/lowest_common_ancestor.py:13
↓ 1 callers
Method
visitNode
(self, node, v)
129_sum_root_to_leaf/sum_root_to_leaf.py:18
Method
__init__
Initialize your data structure here. :type v1: List[int] :type v2: List[int]
281_zigzag_iterator/iterator.py:3
Method
__init__
initialize your data structure here. :type dictionary: List[str]
288_unique_word_abbrevation/abbr.py:3
Method
__init__
initialize your data structure here. :type nums: List[int]
307_range_sum_query_mutable/range_sum_query.py:2
Method
__init__
(self, freqency, children, parent, val)
347_top_k_frequent_elements/topki_pairing_heap.py:3
Method
__init__
(self)
225_impl_stack_using_queues/stack_using_queues.py:4
Method
__init__
initialize your data structure here.
225_impl_stack_using_queues/stack_using_queues_take2.py:2
Method
__init__
Initialize your data structure here.
352_data_stream_disjoint_intervals/352.py:9
Method
__init__
Initialize your data structure here. :type iterator: Iterator
284_peeking_iterator/peeking_iterator.py:23
Method
__init__
initialize your data structure here
170_two_sum_iii/two_sum_iii.py:4
Method
__init__
initialize your data structure here. :type matrix: List[List[int]]
304_range_sum_query_2d/rangesum.py:2
Method
__init__
(self)
211_add_and_search_word/add_and_search_ds.py:4
Method
__init__
initialize your data structure here. :type words: List[str]
244_shortest_word_distance_ii/shortest.py:3
Method
__init__
initialize your data structure here. :type nums: List[int]
303_range_sum_query_imutable/range_sum_query.py:3
Method
__init__
(self, x)
147_insertion_sort_list/insertion_sort_list.py:3
Method
__init__
(self)
208_implement_trie/implement_trie_prefix_tree.py:3
Method
__init__
(self)
208_implement_trie/implement_trie_prefix_tree.py:9
Method
__init__
(self, root)
173_binary_tree_iterator/binary_search_tree_iterator.py:10
Method
__init__
:type root: TreeNode
173_binary_tree_iterator/binary_search_tree_iterator_take2.py:9
Method
__init__
(self, x)
114_flatten_binary_tree_to_linked_list/flatten_binary_tree_take2.py:24
Method
__init__
(self)
158_read_n_chars_ii/read_N_chars.py:7
Method
__init__
Initialize your data structure here.
295_find_median_from_data_stream/median.py:4
Method
__init__
Initialize your data structure here. :type vec2d: List[List[int]]
251_flatten_2d_vector/flatten.py:3
Method
__init__
Initialize your data structure here. :type nestedList: List[NestedInteger]
341_flatten_nested_list_iterator/flatten.py:28
Method
__init__
(self)
155_min_stack/min_stack.py:3
Method
__init__
(self, x)
206_reverse_linked_list/reverse_linked_list.py:2
Method
__init__
(self, capacity)
146_lru_cache/lrucache.py:3
Method
__init__
(self)
232_make_queue_using_stacks/queue_using_stacks.py:3
Method
__repr__
(self)
347_top_k_frequent_elements/topki_pairing_heap.py:10
Method
_cmp
(prefix, n1, n2)
179_largest_number/largest_number_cmp.py:6
Method
addBinary
(self, a, b)
067_add_binary/add_binary.py:5
Method
addDigits
:type num: int :rtype: int
258_add_digits/add_digits.py:2
← previous
next →
101–200 of 604, ranked by callers