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
↓ 1 callers
Method
numberOfLines
(self, widths, S)
number_of_lines_to_write_string.py:8
↓ 1 callers
Method
oddCells
(self, n: int, m: int, indices)
cells_with_odd_values_in_a_matrix.py:10
↓ 1 callers
Method
partitionLabels
(self, S)
partition_labels.py:8
↓ 1 callers
Method
peakIndexInMountainArray
(self, A)
peak_index_in_a_mountain_array.py:8
↓ 1 callers
Function
permutations
(input_string)
permutations_exercises.py:8
↓ 1 callers
Function
permutations2
(string)
permutations_exercises.py:24
↓ 1 callers
Method
pivotIndex
(self, nums)
find_pivot_index.py:9
↓ 1 callers
Method
plusOne
:type digits: List[int] :rtype: List[int]
plus_one.py:10
↓ 1 callers
Function
print_stack
(stack)
stack.py:47
↓ 1 callers
Method
productExceptSelf
(self, nums)
product_of_array_except_self.py:6
↓ 1 callers
Method
push
:type x: int :rtype: void
min_stack.py:13
↓ 1 callers
Method
queensAttacktheKing
(self, queens, king)
queens_that_can_attack_the_king.py:9
↓ 1 callers
Method
rankTeams
(self, votes)
rank_teams_by_votes.py:5
↓ 1 callers
Function
recurse
(index, sum, number_list, target)
recurse_to_target.py:8
↓ 1 callers
Method
relativeSortArray
(self, arr1, arr2)
relative_sort_array.py:9
↓ 1 callers
Method
remove
Removes a value from the set. Returns true if the set contained the specified element.
insert_delete_getrandom_o1.py:25
↓ 1 callers
Method
removeDuplicates
(self, s, k)
remove_all_adjacent_duplicates_in_string_ii.py:8
↓ 1 callers
Method
removeDuplicates
(self, S)
remove_all_adjacent_duplicates_in_string.py:7
↓ 1 callers
Method
removeDuplicates
:type nums: List[int] :rtype: int
remove_diplicates_from_sorted_array.py:10
↓ 1 callers
Method
removeOuterParentheses
(self, S: str)
remove_outermost_parentheses.py:9
↓ 1 callers
Method
removeVowels
(self, S)
remove_vowels_from_a_string.py:7
↓ 1 callers
Method
reorderLogFiles
(self, logs)
reorder_log_files.py:8
↓ 1 callers
Method
reorganizeString
(self, S)
reorganize_string.py:9
↓ 1 callers
Method
repeatedNTimes
(self, A)
n-repeated-element-in-size-2n-array.py:8
↓ 1 callers
Method
repeatedStringMatch
(self, A, B)
repeated_string_match.py:9
↓ 1 callers
Method
replaceElements
(self, arr)
replace_elements_with_greatest_element_on_right_side.py:7
↓ 1 callers
Method
replaceWords
(self, dict, sentence)
replace_words.py:9
↓ 1 callers
Method
return_change
(self)
vending_machine.py:25
↓ 1 callers
Function
return_sum
(number_list, target)
recurse_to_target.py:14
↓ 1 callers
Method
reverseOnlyLetters
(self, S: str)
reverse_only_letters.py:8
↓ 1 callers
Method
reverseParentheses
(self, s)
reverse_substrings_between_each_pair_of_parantheses.py:8
↓ 1 callers
Method
reverseString
Do not return anything, modify s in-place instead.
reverse_string.py:8
↓ 1 callers
Method
reverseVowels
:type s: str :rtype: str
reverse_vowels_of_a_string.py:9
↓ 1 callers
Method
reverseWords
:type s: str :rtype: str
reverse_words_in_a_string_iii.py:8
↓ 1 callers
Method
reverseWords
:param s: str :return: str
reverse_words_in_a_string.py:8
↓ 1 callers
Method
rob
(self, nums)
house_robber.py:8
↓ 1 callers
Method
romanToInt
(self, s: 'str')
roman_to_integer.py:7
↓ 1 callers
Method
rotate
:type matrix: List[List[int]] :rtype: None Do not return anything, modify matrix in-place instead.
rotate_image.py:7
↓ 1 callers
Method
rotateString
(self, A, B)
rotate_string.py:9
↓ 1 callers
Method
rotatedDigits
(self, N)
rotated_digits.py:7
↓ 1 callers
Method
search
(self, nums, target)
binary_search.py:9
↓ 1 callers
Method
searchInsert
(self, nums, target)
search_insert_position.py:10
↓ 1 callers
Method
searchRange
(self, nums, target)
find_first_and_last_position.py:9
↓ 1 callers
Method
selfDividingNumbers
(self, left,right)
self_dividing_numbers.py:8
↓ 1 callers
Method
shortestDistance
(self, words, word1, word2: str)
shortest_word_distance.py:11
↓ 1 callers
Method
shortestToChar
(self, S, C)
shortest_distance_to_a_character.py:9
↓ 1 callers
Method
shortestWay
(self, source, target)
shortest_way_to_form_string.py:9
↓ 1 callers
Method
singleNumber
(self, nums)
single_number_iii.py:8
↓ 1 callers
Method
singleNumber
(self, nums)
single_number_ii.py:8
↓ 1 callers
Method
smallestCommonElement
(self, mat)
find_smallest_common_element_in_all_rows.py:8
↓ 1 callers
Method
sortArrayByParity
(self, A)
sort_array_by_parity.py:9
↓ 1 callers
Method
sortArrayByParityII
(self, A)
sort_array_by_parity_ii_v2.py:8
↓ 1 callers
Method
sortArrayByParityII
(self, A)
sort_array_by_parity_ii.py:8
↓ 1 callers
Method
sortByBits
(self, arr)
sort_integers_by_number_of_bits.py:8
↓ 1 callers
Method
sortColors
Do not return anything, modify nums in-place instead.
sort_colors.py:7
↓ 1 callers
Method
sortString
(self, s: str)
increasing_decreasing_strings.py:10
↓ 1 callers
Method
sortedSquares
(self, A)
squares_of_a_sorted_array.py:8
↓ 1 callers
Function
stack_sort
(stack)
stack.py:50
↓ 1 callers
Method
strStr
(self, haystack, needle)
implement_strstr.py:9
↓ 1 callers
Method
subarraySum
(self, nums, k)
subarray_equals_k.py:10
↓ 1 callers
Method
sumEvenAfterQueries
(self, A, queries)
sum_of_even_numbers_after_queries.py:10
↓ 1 callers
Method
sumOfDigits
(self, A)
sum_of_digits_in_the_minimum_number.py:9
↓ 1 callers
Method
summaryRanges
(self, nums)
summary_ranges.py:8
↓ 1 callers
Method
thousandSeparator
(self, n)
thousand-separator.py:6
↓ 1 callers
Method
threeSum
(self, nums: 'List[int]')
3sum.py:8
↓ 1 callers
Method
toGoatLatin
:type s: str :rtype: str
goat_latin.py:10
↓ 1 callers
Method
toHex
(self, num: int)
convert_a_number_to_hexadecimal.py:6
↓ 1 callers
Method
toLowerCase
(self, str: str)
to_lower_case.py:9
↓ 1 callers
Method
top
:rtype: int
min_stack.py:26
↓ 1 callers
Method
topKFrequent
(self, nums, k)
top_k_frequent_elements.py:12
↓ 1 callers
Method
topKFrequent
(self, words, k)
top_k_frequent_words.py:9
↓ 1 callers
Method
totalFruit
:type tree: List[int] :rtype: int
fruit_into_baskets.py:8
↓ 1 callers
Method
totalFruit
(self, tree)
fruit_into_baskets_2.py:8
↓ 1 callers
Method
transformArray
(self, arr)
array_transformation.py:8
↓ 1 callers
Method
trap
(self, height)
trapping_rain_water.py:9
↓ 1 callers
Method
tribonacci
(self, n)
nth-tribonacci_number.py:6
↓ 1 callers
Method
twoCitySchedCost
(self, costs)
two_city_scheduling.py:8
↓ 1 callers
Method
twoSum
:type nums: List[int] :type target: int :rtype: List[int]
twosum.py:8
↓ 1 callers
Method
twoSum
(self, numbers, target)
two_sum_ii_input_is_sorted.py:8
↓ 1 callers
Method
twoSum
:type nums: List[int] :type target: int :rtype: List[int]
twosum_2.py:8
↓ 1 callers
Method
twoSumLessThanK
(self, A, K)
two_sum_less_than_k.py:8
↓ 1 callers
Method
uncommonFromSentences
(self, A, B)
uncommon_words_from_two_sentences.py:10
↓ 1 callers
Method
uniqueMorseRepresentations
(self, words)
unique_morse_code_words.py:8
↓ 1 callers
Method
uniqueOccurrences
(self, arr)
unique_number_of_occurrences.py:9
↓ 1 callers
Method
validPalindrome
(self, s)
valid_palindrome-ii.py:15
↓ 1 callers
Method
validateStackSequences
(self, pushed, popped)
validate_stack_sequences.py:7
↓ 1 callers
Method
wiggle_sort
:param nums: List(int) :return: : List(int)
wiggle_sort_ii.py:11
↓ 1 callers
Method
wordBreak
:type s: str :type wordDict: List[str] :rtype: List[str]
word_break_ii.py:13
↓ 1 callers
Method
xorOperation
(self, n: int, start: int)
xor_operation_in_an_array.py:4
Method
Front
Get the front item from the queue.
design_circular_queue.py:31
Method
Rear
Get the last item from the queue.
design_circular_queue.py:40
Method
__init__
set capacity
lru_cache.py:9
Method
__init__
initialize your data structure here.
min_stack_v2.py:7
Method
__init__
Initialize your data structure here. :type iterator: Iterator
peeking_iterator.py:23
Method
__init__
Initialize your data structure here. Set the size of the queue to be k.
design_circular_queue.py:7
Method
__init__
(self)
vending_machine.py:7
Method
__init__
initialize your data structure here.
min_stack.py:7
Method
__init__
Initialize your data structure here.
insert_delete_getrandom_o1.py:8
Method
__init__
Initialize your data structure here.
logger_rate_limiter.py:6
Method
__init__
initialize your data structure here.
max_stack.py:6
← previous
next →
201–300 of 440, ranked by callers