MCPcopy Create free account

hub / github.com/bwiens/leetcode-python / functions

Functions440 in github.com/bwiens/leetcode-python

↓ 1 callersMethodnumberOfLines
(self, widths, S)
number_of_lines_to_write_string.py:8
↓ 1 callersMethododdCells
(self, n: int, m: int, indices)
cells_with_odd_values_in_a_matrix.py:10
↓ 1 callersMethodpartitionLabels
(self, S)
partition_labels.py:8
↓ 1 callersMethodpeakIndexInMountainArray
(self, A)
peak_index_in_a_mountain_array.py:8
↓ 1 callersFunctionpermutations
(input_string)
permutations_exercises.py:8
↓ 1 callersFunctionpermutations2
(string)
permutations_exercises.py:24
↓ 1 callersMethodpivotIndex
(self, nums)
find_pivot_index.py:9
↓ 1 callersMethodplusOne
:type digits: List[int] :rtype: List[int]
plus_one.py:10
↓ 1 callersFunctionprint_stack
(stack)
stack.py:47
↓ 1 callersMethodproductExceptSelf
(self, nums)
product_of_array_except_self.py:6
↓ 1 callersMethodpush
:type x: int :rtype: void
min_stack.py:13
↓ 1 callersMethodqueensAttacktheKing
(self, queens, king)
queens_that_can_attack_the_king.py:9
↓ 1 callersMethodrankTeams
(self, votes)
rank_teams_by_votes.py:5
↓ 1 callersFunctionrecurse
(index, sum, number_list, target)
recurse_to_target.py:8
↓ 1 callersMethodrelativeSortArray
(self, arr1, arr2)
relative_sort_array.py:9
↓ 1 callersMethodremove
Removes a value from the set. Returns true if the set contained the specified element.
insert_delete_getrandom_o1.py:25
↓ 1 callersMethodremoveDuplicates
(self, s, k)
remove_all_adjacent_duplicates_in_string_ii.py:8
↓ 1 callersMethodremoveDuplicates
(self, S)
remove_all_adjacent_duplicates_in_string.py:7
↓ 1 callersMethodremoveDuplicates
:type nums: List[int] :rtype: int
remove_diplicates_from_sorted_array.py:10
↓ 1 callersMethodremoveOuterParentheses
(self, S: str)
remove_outermost_parentheses.py:9
↓ 1 callersMethodremoveVowels
(self, S)
remove_vowels_from_a_string.py:7
↓ 1 callersMethodreorderLogFiles
(self, logs)
reorder_log_files.py:8
↓ 1 callersMethodreorganizeString
(self, S)
reorganize_string.py:9
↓ 1 callersMethodrepeatedNTimes
(self, A)
n-repeated-element-in-size-2n-array.py:8
↓ 1 callersMethodrepeatedStringMatch
(self, A, B)
repeated_string_match.py:9
↓ 1 callersMethodreplaceElements
(self, arr)
replace_elements_with_greatest_element_on_right_side.py:7
↓ 1 callersMethodreplaceWords
(self, dict, sentence)
replace_words.py:9
↓ 1 callersMethodreturn_change
(self)
vending_machine.py:25
↓ 1 callersFunctionreturn_sum
(number_list, target)
recurse_to_target.py:14
↓ 1 callersMethodreverseOnlyLetters
(self, S: str)
reverse_only_letters.py:8
↓ 1 callersMethodreverseParentheses
(self, s)
reverse_substrings_between_each_pair_of_parantheses.py:8
↓ 1 callersMethodreverseString
Do not return anything, modify s in-place instead.
reverse_string.py:8
↓ 1 callersMethodreverseVowels
:type s: str :rtype: str
reverse_vowels_of_a_string.py:9
↓ 1 callersMethodreverseWords
:type s: str :rtype: str
reverse_words_in_a_string_iii.py:8
↓ 1 callersMethodreverseWords
:param s: str :return: str
reverse_words_in_a_string.py:8
↓ 1 callersMethodrob
(self, nums)
house_robber.py:8
↓ 1 callersMethodromanToInt
(self, s: 'str')
roman_to_integer.py:7
↓ 1 callersMethodrotate
:type matrix: List[List[int]] :rtype: None Do not return anything, modify matrix in-place instead.
rotate_image.py:7
↓ 1 callersMethodrotateString
(self, A, B)
rotate_string.py:9
↓ 1 callersMethodrotatedDigits
(self, N)
rotated_digits.py:7
↓ 1 callersMethodsearch
(self, nums, target)
binary_search.py:9
↓ 1 callersMethodsearchInsert
(self, nums, target)
search_insert_position.py:10
↓ 1 callersMethodsearchRange
(self, nums, target)
find_first_and_last_position.py:9
↓ 1 callersMethodselfDividingNumbers
(self, left,right)
self_dividing_numbers.py:8
↓ 1 callersMethodshortestDistance
(self, words, word1, word2: str)
shortest_word_distance.py:11
↓ 1 callersMethodshortestToChar
(self, S, C)
shortest_distance_to_a_character.py:9
↓ 1 callersMethodshortestWay
(self, source, target)
shortest_way_to_form_string.py:9
↓ 1 callersMethodsingleNumber
(self, nums)
single_number_iii.py:8
↓ 1 callersMethodsingleNumber
(self, nums)
single_number_ii.py:8
↓ 1 callersMethodsmallestCommonElement
(self, mat)
find_smallest_common_element_in_all_rows.py:8
↓ 1 callersMethodsortArrayByParity
(self, A)
sort_array_by_parity.py:9
↓ 1 callersMethodsortArrayByParityII
(self, A)
sort_array_by_parity_ii_v2.py:8
↓ 1 callersMethodsortArrayByParityII
(self, A)
sort_array_by_parity_ii.py:8
↓ 1 callersMethodsortByBits
(self, arr)
sort_integers_by_number_of_bits.py:8
↓ 1 callersMethodsortColors
Do not return anything, modify nums in-place instead.
sort_colors.py:7
↓ 1 callersMethodsortString
(self, s: str)
increasing_decreasing_strings.py:10
↓ 1 callersMethodsortedSquares
(self, A)
squares_of_a_sorted_array.py:8
↓ 1 callersFunctionstack_sort
(stack)
stack.py:50
↓ 1 callersMethodstrStr
(self, haystack, needle)
implement_strstr.py:9
↓ 1 callersMethodsubarraySum
(self, nums, k)
subarray_equals_k.py:10
↓ 1 callersMethodsumEvenAfterQueries
(self, A, queries)
sum_of_even_numbers_after_queries.py:10
↓ 1 callersMethodsumOfDigits
(self, A)
sum_of_digits_in_the_minimum_number.py:9
↓ 1 callersMethodsummaryRanges
(self, nums)
summary_ranges.py:8
↓ 1 callersMethodthousandSeparator
(self, n)
thousand-separator.py:6
↓ 1 callersMethodthreeSum
(self, nums: 'List[int]')
3sum.py:8
↓ 1 callersMethodtoGoatLatin
:type s: str :rtype: str
goat_latin.py:10
↓ 1 callersMethodtoHex
(self, num: int)
convert_a_number_to_hexadecimal.py:6
↓ 1 callersMethodtoLowerCase
(self, str: str)
to_lower_case.py:9
↓ 1 callersMethodtop
:rtype: int
min_stack.py:26
↓ 1 callersMethodtopKFrequent
(self, nums, k)
top_k_frequent_elements.py:12
↓ 1 callersMethodtopKFrequent
(self, words, k)
top_k_frequent_words.py:9
↓ 1 callersMethodtotalFruit
:type tree: List[int] :rtype: int
fruit_into_baskets.py:8
↓ 1 callersMethodtotalFruit
(self, tree)
fruit_into_baskets_2.py:8
↓ 1 callersMethodtransformArray
(self, arr)
array_transformation.py:8
↓ 1 callersMethodtrap
(self, height)
trapping_rain_water.py:9
↓ 1 callersMethodtribonacci
(self, n)
nth-tribonacci_number.py:6
↓ 1 callersMethodtwoCitySchedCost
(self, costs)
two_city_scheduling.py:8
↓ 1 callersMethodtwoSum
:type nums: List[int] :type target: int :rtype: List[int]
twosum.py:8
↓ 1 callersMethodtwoSum
(self, numbers, target)
two_sum_ii_input_is_sorted.py:8
↓ 1 callersMethodtwoSum
:type nums: List[int] :type target: int :rtype: List[int]
twosum_2.py:8
↓ 1 callersMethodtwoSumLessThanK
(self, A, K)
two_sum_less_than_k.py:8
↓ 1 callersMethoduncommonFromSentences
(self, A, B)
uncommon_words_from_two_sentences.py:10
↓ 1 callersMethoduniqueMorseRepresentations
(self, words)
unique_morse_code_words.py:8
↓ 1 callersMethoduniqueOccurrences
(self, arr)
unique_number_of_occurrences.py:9
↓ 1 callersMethodvalidPalindrome
(self, s)
valid_palindrome-ii.py:15
↓ 1 callersMethodvalidateStackSequences
(self, pushed, popped)
validate_stack_sequences.py:7
↓ 1 callersMethodwiggle_sort
:param nums: List(int) :return: : List(int)
wiggle_sort_ii.py:11
↓ 1 callersMethodwordBreak
:type s: str :type wordDict: List[str] :rtype: List[str]
word_break_ii.py:13
↓ 1 callersMethodxorOperation
(self, n: int, start: int)
xor_operation_in_an_array.py:4
MethodFront
Get the front item from the queue.
design_circular_queue.py:31
MethodRear
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
← previousnext →201–300 of 440, ranked by callers