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
addNum
:type val: int :rtype: void
352_data_stream_disjoint_intervals/352.py:15
Method
addNum
Adds a num into the data structure. :type num: int :rtype: void
295_find_median_from_data_stream/median.py:11
Method
addOperators
:type num: str :type target: int :rtype: List[str]
282_expression_add_operators/expression_add_operators_TLE.py:2
Method
addOperators
:type num: str :type target: int :rtype: List[str]
282_expression_add_operators/expression_add_operators.py:2
Method
addTwoNumbers
:type l1: ListNode :type l2: ListNode :rtype: ListNode
002_add_two_numbers/add_two_numbers.py:2
Method
addWord
(self, word)
211_add_and_search_word/add_and_search_ds.py:11
Method
ajacent
(self, pos1, pos2)
079_word_search/word_search_TLE.py:18
Method
ajacent
(self, pos1, pos2)
079_word_search/word_search.py:17
Method
alienOrder
:type words: List[str] :rtype: str
269_alien_dictionary/dictionary.py:2
Method
allWordsFound
(d)
030_substring_with_cancatenation_all_words/substring_concat_all_words_TLE.py:17
Method
anagrams
(self, strs)
049_group_anagrams/anagrams.py:5
Method
backtrack
()
010_regular_expression_matching/regular_expression_matching.py:38
Method
binaryTreePaths
:type root: TreeNode :rtype: List[str]
257_binary_tree_paths/binary_tree_paths.py:9
Method
buildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
105_construct_bt_from_preorder_inorder/contruct_binary_tree_from_preorder_inorder.py:9
Method
buildTree
:type inorder: List[int] :type postorder: List[int] :rtype: TreeNode
106_construct_bt_from_postorder_inorder/construct_binary_tree_from_inorder_postorder.py:9
Method
bulbSwitch
:type n: int :rtype: int
319_bulb_switcher/bulb_switcher.py:3
Method
calculate
:type s: str :rtype: int
227_basic_calculator_ii/basic_calculator_ii_take2.py:2
Method
calculate
(self, s)
227_basic_calculator_ii/basic_calculator_ii.py:11
Method
calculate
:type s: str :rtype: int
224_basic_calculator/cal.py:15
Method
calculateMinimumHP
:type dungeon: List[List[int]] :rtype: int
174_dungeon_game/dungeon_game.py:2
Method
canAttendMeetings
:type intervals: List[Interval] :rtype: bool
252_meeting_rooms/meeting_rooms.py:9
Method
canCompleteCircuit
:type gas: List[int] :type cost: List[int] :rtype: int
134_gas_station/gas_station.py:2
Method
canFinish
(self, numCourses, prerequisites)
207_course_schedule/course_schedule.py:5
Method
canPermutePalindrome
:type s: str :rtype: bool
266_palindrome_permutation/permutation.py:3
Method
canReach
(i)
055_jump_game/jump_game_TLE.py:6
Method
canWin
:type s: str :rtype: bool
294_flip_game_ii/flip.py:2
Method
canWinNim
:type n: int :rtype: bool
292_nim_game/vim.py:3
Method
canWinNim
:type n: int :rtype: bool
292_nim_game/nim_naive.py:3
Method
candy
:type ratings: List[int] :rtype: int
135_candies/candy.py:2
Method
candy
:type ratings: List[int] :rtype: int
135_candies/candy_graph.py:3
Method
check_distance_t
(i)
220_contains_duplicate_iii/contains_duplicate_iii.py:10
Method
climbStairs
(self, n)
070_climbing_stairs/climb_stairs.py:4
Method
cloneGraph
(self, node)
133_clone_graph/clone_graph.py:10
Method
closestKValues
:type root: TreeNode :type target: float :type k: int :rtype: List[int]
272_closest_binary_search_tree_values/closest.py:9
Method
closestValue
:type root: TreeNode :type target: float :rtype: int
270_closest_binary_search_tree_value/closest.py:9
Method
coinChange
:type coins: List[int] :type amount: int :rtype: int
322_coin_change/coin_change_TLE.py:3
Method
coinChange
:type coins: List[int] :type amount: int :rtype: int
322_coin_change/coin_change_TLE2.py:4
Method
combinationSum
:type candidates: List[int] :type target: int :rtype: List[List[int]]
039_combination_sum/combination_sum.py:2
Method
combinationSum2
:type candidates: List[int] :type target: int :rtype: List[List[int]]
040_combination_sum_ii/combination_sum_ii.py:3
Method
combinationSum3
:type k: int :type n: int :rtype: List[List[int]]
216_combination_sum_iii/combination_sum_iii.py:2
Method
combine
:type n: int :type k: int :rtype: List[List[int]]
077_combinations/combinations.py:2
Method
computeArea
(self, A, B, C, D, E, F, G, H)
223_rectangle_area/rectangle_area.py:11
Method
connect
:type root: TreeLinkNode :rtype: nothing
116_populating_next_right_pointers_in_each_node/populating_next_right_pointers.py:10
Method
connect
:type root: TreeLinkNode :rtype: nothing
117_populating_next_right_pointers_in_each_node_ii/populating_next_right_ii.py:10
Method
containsDuplicate
(self, nums)
217_contains_duplicate/contains_duplicate.py:4
Method
containsNearbyAlmostDuplicate
:type nums: List[int] :type k: int :type t: int :rtype: bool
220_contains_duplicate_iii/contains_duplicate_iii_TLE.py:2
Method
containsNearbyAlmostDuplicate
:type nums: List[int] :type k: int :type t: int :rtype: bool
220_contains_duplicate_iii/contains_duplicate_iii.py:2
Method
containsNearbyDuplicate
(self, nums, k)
219_contains_duplicate_ii/contains_duplicate_ii.py:6
Method
convert
(p)
051_n_queens/n_queens.py:22
Method
convert
(self, s, numRows)
006_zigzag_conversion/zigzag.py:6
Method
convertToTitle
:type n: int :rtype: str
168_excel_sheet/excel_sheet_column_title_take2.py:2
Method
copyRandomList
:type head: RandomListNode :rtype: RandomListNode
138_copy_list_with_random_pointer/copy_node_list_random.py:9
Method
countAndSay
(self, n)
038_count_and_say/count_and_say.py:4
Method
countBits
:type num: int :rtype: List[int]
338_counting_bits/338_counting_bits.py:2
Method
countComponents
:type n: int :type edges: List[List[int]] :rtype: int
323_number_of_connected_components/components.py:4
Method
countDigitOne
:type n: int :rtype: int
233_number_of_digit_one/number_of_digit_one.py:2
Method
countNodes
:type root: TreeNode :rtype: int
222_count_complete_tree_nodes/count_complete_tree_nodes_take2.py:9
Method
countNodes
(self, root)
222_count_complete_tree_nodes/count_complete_tree_nodes.py:11
Method
countPrimes
:type n: int :rtype: int
204_count_primes/count_primes.py:2
Method
countRangeSum
:type nums: List[int] :type lower: int :type upper: int :rtype: int
327_count_of_range_sum/count_of_range_sum.py:2
Method
countSmaller
:type nums: List[int] :rtype: List[int]
315_count_of_smaller_numbers/count_of_smaller_numbers.py:2
Method
countSmaller
:type nums: List[int] :rtype: List[int]
315_count_of_smaller_numbers/count_of_smaller_numbers_TLE.py:2
Method
countUnivalSubtrees
:type root: TreeNode :rtype: int
250_count_univalue_subtrees/univalue_subtrees.py:9
Method
decode
Decodes a single string to a list of strings. :type s: str :rtype: List[str]
271_encode_and_decode_strings/encode_and_decode.py:14
Method
deleteDuplicates
:type head: ListNode :rtype: ListNode
083_remove_duplicates_from_sorted_list_ii/remove-duplicates-from-sorted-list.py:8
Method
deleteDuplicates
:type head: ListNode :rtype: ListNode
082_remove_duplicates_from_sorted_list/remove_duplicates_from_sorted_list.py:8
Method
deleteNode
(self, node)
237_delete_node_in_linked_list/delete_node_in_linked_list.py:16
Method
depthSum
:type nestedList: List[NestedInteger] :rtype: int
339_nested_list_weighted_sum/weight_sum.py:27
Method
deserialize
Decodes your encoded data to tree. :type data: str :rtype: TreeNode
297_serialize_and_deserialize_binary_tree/serialize_and_desialize_binary_tree_MLE.py:26
Method
deserialize
Decodes your encoded data to tree. :type data: str :rtype: TreeNode
297_serialize_and_deserialize_binary_tree/serialize_and_desialize_binary_tree.py:31
Method
detectCycle
:type head: ListNode :rtype: ListNode
142_linked_list_cycle_ii/linked_list_cycle_ii.py:3
Method
diff
(word1, word2)
127_word_ladder/word_ladder.py:10
Method
diff
(word1, word2)
127_word_ladder/word_ladder_TLE.py:9
Method
diff
(word1, word2)
126_word_ladder_ii/word_ladder_ii_TLE.py:10
Method
diffWaysToCompute
(self, input)
241_different_ways_to_add_parenthesis/different_ways_to_add_parenthesis.py:7
Method
diffWaysToCompute
:type input: str :rtype: List[int]
241_different_ways_to_add_parenthesis/different_ways_to_add_parenthesis_take2.py:2
Method
dp
(x, y)
329_longest_increasing_path/longest_increasing_path.py:15
Method
empty
(self)
225_impl_stack_using_queues/stack_using_queues.py:30
Method
empty
:rtype: bool
225_impl_stack_using_queues/stack_using_queues_take2.py:40
Method
empty
(self)
232_make_queue_using_stacks/queue_using_stacks.py:41
Method
encode
Encodes a list of strings to a single string. :type strs: List[str] :rtype: str
271_encode_and_decode_strings/encode_and_decode.py:3
Method
evalRPN
:type tokens: List[str] :rtype: int
150_evaluate_reverse_polish/evaluate_reverse_polish_notation.py:2
Method
exist
:type board: List[List[str]] :type word: str :rtype: bool
079_word_search/word_search_TLE.py:6
Method
exist
:type board: List[List[str]] :type word: str :rtype: bool
079_word_search/word_search.py:5
Method
findCelebrity
(self, n)
277_find_the_celebrity/celebrity.py:8
Method
findDuplicate
:type nums: List[int] :rtype: int
287_finding_duplicate_number/find_the_duplicate_number.py:315
Method
findItinerary
:type tickets: List[List[str]] :rtype: List[str]
332_reconstruct_itinerary/332_reconstruct_itinerary.py:2
Method
findKthLargest
(self, nums, k)
215_kth_element_in_array/kth_largest.py:9
Method
findKthLargest
:type nums: List[int] :type k: int :rtype: int
215_kth_element_in_array/no_cheat.py:2
Method
findLadders
:type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int
126_word_ladder_ii/word_ladder_ii_TLE.py:3
Method
findMedian
Returns the median of current data stream :rtype: float
295_find_median_from_data_stream/median.py:36
Method
findMedianSortedArrays
:type nums1: List[int] :type nums2: List[int] :rtype: float
004_median_of_2_sorted_arrays/median_sorted_arrays.py:14
Method
findMedianSortedArrays
:type nums1: List[int] :type nums2: List[int] :rtype: float
004_median_of_2_sorted_arrays/median_of_2_sorted_arrays_TLE.py:4
Method
findMedianSortedArrays
(self, nums1, nums2)
004_median_of_2_sorted_arrays/median_of_2_sorted_arrays.py:2
Method
findMin
:type nums: List[int] :rtype: int
153_find_minimum_rotated_sorted_array/minimum_in_rotated_sorted.py:2
Method
findMin
:type nums: List[int] :rtype: int
154_find_minimum_in_rotated_array_ii/find.py:2
Method
findMinHeightTrees
:type n: int :type edges: List[List[int]] :rtype: List[int]
310_minimum_height_trees/mininum_height_trees.py:2
Method
findMissingRanges
:type nums: List[int] :type lower: int :type upper: int :rtype: List[str]
163_find_missing_ranges/find_missing_ranges.py:2
Method
findOrder
:type numCourses: int :type prerequisites: List[List[int]] :rtype: List[int]
210_course_schedule_ii/course_schedule_ii.py:2
Method
findPeakElement
(self, nums)
162_peak_element/find_peak_element.py:4
← previous
next →
201–300 of 604, ranked by callers