Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bwiens/leetcode-python
/ functions
Functions
440 in github.com/bwiens/leetcode-python
⨍
Functions
440
◇
Types & classes
332
Method
__init__
initialize your data structure here.
find_median_from_data_stream.py:3
Method
__init__
(self)
number_of_recent_calls.py:7
Method
__init__
Initialize your data structure here.
design_hit_counter.py:6
Method
__init__
Initialize your data structure here.
time_based_key_value_store.py:6
Method
__init__
(self)
design_a_leaderboard.py:7
Method
addNum
(self, num: int)
find_median_from_data_stream.py:10
Method
addScore
(self, playerId: int, score: int)
design_a_leaderboard.py:10
Method
addTwoNumbers
(self, l1: ListNode, l2: ListNode)
add_two_numbers.py:10
Method
averageOfLevels
:type root: TreeNode :rtype: List[float]
average_of_levels_in_binary_tree.py:13
Method
backtrack
(s, left, right)
generate_parentheses.py:19
Method
binaryTreePaths
(self, root: TreeNode)
binary_tree_paths.py:5
Method
bstToGst
(self, root: TreeNode)
binary_search_tree_to_greater_sum_tree.py:5
Method
canAttendMeetings
:type intervals: List[Interval] :rtype: bool
meeting_rooms.py:12
Method
cloneGraph
(self, node: 'Node')
clone_graph.py:10
Method
closestValue
(self, root: TreeNode, target: float)
closest_binary_search_tree_value.py:6
Method
connect
(self, root: 'Node')
populating_next_right_pointers_in_each_node_ii.py:14
Method
connect
(self, root: 'Node')
populating_next_right_pointers_in_each_node.py:15
Method
constructMaximumBinaryTree
(self, nums: List[int])
maximum_binary_tree.py:12
Method
copyRandomList
(self, head: 'Node')
copy_list_with_random_pointer.py:13
Method
countI
(rid, cid, grid)
number_of_closed_islands.py:8
Method
countMatches
(word1, word2)
guess_the_word.py:10
Method
countNodes
(self, root: TreeNode)
count_complete_tree_nodes.py:11
Method
count_neighbors
(rindex, cindex, count)
max_area_of_island.py:17
Method
crawl
(self, startUrl: str, htmlParser: 'HtmlParser')
web_crawler.py:16
Method
deQueue
Delete an element from the circular queue. Return true if the operation is successful.
design_circular_queue.py:23
Method
deepestLeavesSum
(self, root: TreeNode)
deepest_leaves_sum.py:6
Method
delNodes
:type root: TreeNode :type to_delete: List[int] :rtype: List[TreeNode]
delete_nodes_and_return_forest.py:3
Method
deleteDuplicates
(self, head: ListNode)
remove_duplicates_from_sorted_list.py:10
Method
deleteNode
:type node: ListNode :rtype: void Do not return anything, modify node in-place instead.
delete_node_in_a_linked_list.py:12
Method
depthSum
(self, nestedList: List[NestedInteger])
nested_list_weight.py:48
Method
depthvisit
(nestedList, depth)
nested_list_weight.py:49
Method
deserialize
(self, data)
serialize_and_deserialize_binary_tree.py:33
Method
detectCycle
(self, head: ListNode)
linked_list_cycle_ii.py:11
Method
dfs
(node)
range_sum_of_bst.py:15
Method
dfs
(rid, cid, word, visited, found)
word_search.py:15
Method
dfs
(root)
find_leaves_of_binary_tree.py:3
Method
enQueue
Insert an element into the circular queue. Return true if the operation is successful.
design_circular_queue.py:14
Method
findBottomLeftValue
(self, root: TreeNode)
find_bottom_left_tree_value.py:14
Method
findGold
(rid, cid, sum)
path_with_maximum_gold.py:11
Method
findLeaves
(self, root: TreeNode)
find_leaves_of_binary_tree.py:2
Method
findMedian
(self)
find_median_from_data_stream.py:13
Method
findSecretWord
(self, wordlist: List[str], master: 'Master')
guess_the_word.py:8
Method
findSolution
(self, customfunction, z)
find_positive_integer_solution_for_a_given_equation.py:6
Method
firstBadVersion
:type n: int :rtype: int
first_bad_version.py:12
Method
flatten
(self, head: 'Node')
flatten_a_multilevel_doubly_linked_list.py:14
Method
get
(self, key: str, timestamp: int)
time_based_key_value_store.py:19
Method
getHits
Return the number of hits in the past 5 minutes. @param timestamp - The current timestamp (in seconds granularity).
design_hit_counter.py:24
Method
getIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
intersection_of_two_linked_lists.py:11
Method
getMin
(self)
min_stack_v2.py:31
Method
getMinimumDifference
(self, root: TreeNode)
minimum_absolute_difference_in_bst.py:15
Method
getRandom
Get a random element from the set.
insert_delete_getrandom_o1.py:36
Method
guessNumber
:type n: int :rtype: int
guess_number_higher_or_lower.py:7
Method
hasCycle
:type head: ListNode :rtype: bool
linked_list_cycle.py:12
Method
hasPathSum
(self, root: TreeNode, sum: int)
path_sum.py:13
Method
helper
(N)
fibonacci_number.py:11
Method
hit
Record a hit. @param timestamp - The current timestamp (in seconds granularity).
design_hit_counter.py:13
Method
insert
Inserts a value to the set. Returns true if the set did not already contain the specified element.
insert_delete_getrandom_o1.py:14
Method
insertIntoBST
(self, root: TreeNode, val: int)
insert_into_a_binary_search_tree.py:12
Method
invertTree
(self, root)
invert_binary_tree.py:9
Method
isEmpty
Checks whether the circular queue is empty or not.
design_circular_queue.py:49
Method
isFull
Checks whether the circular queue is full or not.
design_circular_queue.py:58
Method
isPalindrome
(self, head: ListNode)
palindrome_linked_list.py:12
Method
isSameTree
(self, p: TreeNode, q: TreeNode)
same_tree.py:7
Method
isSubtree
(self, s: TreeNode, t: TreeNode)
subtree_of_another_tree.py:14
Method
isSymmetric
(self, root: TreeNode)
symmetric_tree.py:11
Method
isUnivalTree
(self, root: TreeNode)
univalued_binary_tree.py:13
Method
largestValues
(self, root: TreeNode)
find_largest_value_in_each_tree_row.py:15
Method
leafSimilar
(self, root1, root2)
leaf_similar_trees.py:5
Method
leftMostColumnWithOne
(self, binaryMatrix: 'BinaryMatrix')
leftmost_column_with_at_least_a_one.py:2
Method
levelOrder
:type root: TreeNode :rtype: List[List[int]]
binary_tree_level_order_traversal.py:14
Method
levelOrder
(self, root: 'Node')
n-ary-tree-level-order_traversal.py:13
Method
levelOrderBottom
:type root: TreeNode :rtype: List[List[int]]
binary_tree_level_order_traversal_ii.py:13
Method
lowestCommonAncestor
(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode')
lowest_common_ancestor_of_a_binary_search_tree.py:12
Method
maxDepth
(self, root: 'Node')
maximum_depth_of_n-ary-tree.py:13
Method
maxDepth
(self, root: TreeNode)
maximum_depth_of_binary_tree.py:13
Method
maxLevelSum
(self, root: TreeNode)
maximum_level_sum_of_a_binary_tree.py:12
Method
mergeKLists
(self, lists: List[ListNode])
merge_k_sorted_lists.py:8
Method
mergeTrees
(self, t1: TreeNode, t2: TreeNode)
merge_two_binary_trees.py:13
Method
middleNode
(self, head: ListNode)
bt_ll_traversal_examples.py:33
Method
middleNode
(self, head: ListNode)
middle_of_the_linked_list.py:13
Method
minDepth
(self, root: TreeNode)
minimum_depth_of_a_binary_tree.py:12
Method
numComponents
(self, head: ListNode, G: List[int])
linked_list_components.py:11
Method
numUniqueEmails
:type emails: List[str] :rtype: int
unique_email_addresses_2.py:9
Method
oddEvenList
(self, head: ListNode)
odd_even_linked_list.py:13
Method
pathSum
(self, root: TreeNode, sum: int)
path_sum_ii.py:13
Method
peek
Returns the next element in the iteration without advancing the iterator. :rtype: int
peeking_iterator.py:31
Method
peekMax
(self)
max_stack.py:23
Method
permute
(self, nums: 'List[int]')
permutations.py:20
Method
ping
(self, t: int)
number_of_recent_calls.py:10
Method
plusOne
(self, head: ListNode)
plus_one_linked_list.py:6
Function
pop
(stack)
stack.py:35
Method
pop
(self)
min_stack_v2.py:21
Method
pop
(self)
max_stack.py:16
Method
popMax
(self)
max_stack.py:26
Method
possible
(x)
divide_chocolate.py:10
Method
postorder
(self, root: 'Node')
n-ary-tree-postorder_traversal.py:11
Method
preorder
(self, root: 'Node')
n-ary-tree-preorder_traversal.py:12
Method
push
(self, x: int)
min_stack_v2.py:13
Method
push
(self, x: int)
max_stack.py:13
Method
rangeSumBST
(self, root: TreeNode, L: int, R: int)
bt_ll_traversal_examples.py:4
← previous
next →
301–400 of 440, ranked by callers