MCPcopy Create free account

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

Functions440 in github.com/bwiens/leetcode-python

↓ 60 callersMethodget
(self, key: int)
lru_cache.py:13
↓ 40 callersMethodpop
:rtype: void
min_stack.py:20
↓ 6 callersFunctionpush
(stack, item)
stack.py:44
↓ 4 callersFunctionf
(x)
find_first_positive_number.py:8
↓ 3 callersMethodpermutations
(self, string)
permutations.py:7
↓ 3 callersMethodput
(self, key: int, value: int)
lru_cache.py:25
↓ 3 callersMethodreverse
:type x: int :rtype: int
reverse_integer.py:9
↓ 2 callersMethodbuy_item
(self)
vending_machine.py:13
↓ 2 callersMethodisPalindrome
:type s: str :rtype: bool
valid_palindrome.py:13
↓ 2 callersMethodisValid
(self, s, k, l)
valid_palindrome-ii.py:6
↓ 2 callersFunctionis_empty
(stack)
stack.py:29
↓ 2 callersMethodnumJewelsInStones
:type J: str :type S: str :rtype: int
jewels_and_stones.py:14
↓ 2 callersMethodshow_items
(self)
vending_machine.py:10
↓ 2 callersMethodsingleNumber
(self, nums)
single_number.py:9
↓ 1 callersMethodaddBinary
(self, a, b)
add_binary.py:8
↓ 1 callersFunctionaddDigits
(digits)
add_digits.py:4
↓ 1 callersMethodaddDigits
(self, num)
add_digits_lc.py:7
↓ 1 callersMethodaddStrings
(self, num1, num2)
add_strings.py:7
↓ 1 callersMethodaddToArrayForm
(self, A, K)
add_to_array_form_of_integer.py:8
↓ 1 callersMethodadd_items
(self, newitem)
vending_machine.py:20
↓ 1 callersMethodallCellsDistOrder
(self, R, C, r0, c0)
matrix_cells_in_distance_order.py:10
↓ 1 callersMethodallPathsSourceTarget
(self, graph)
all_paths_from_source_to_target.py:8
↓ 1 callersMethodareSentencesSimilar
(self, words1, words2, pairs)
sentence_similarity.py:11
↓ 1 callersMethodareSentencesSimilarTwo
(self, words1, words2, pairs)
sentence_similarity_ii.py:10
↓ 1 callersMethodarrayPairSum
(self, nums)
array_partition_i.py:9
↓ 1 callersMethodarraysIntersection
(self, arr1, arr2, arr3)
intersection_of_three_sorted_arrays.py:11
↓ 1 callersMethodassignBikes
(self, workers, bikes)
campus_bikes.py:9
↓ 1 callersFunctionautocomplete
(s, words)
autocomplete.py:5
↓ 1 callersMethodbackspaceCompare
(self, S: str, T: str)
backspace_string_compare.py:9
↓ 1 callersMethodbalancedStringSplit
(self, s: str)
split_a_string_in_balanced_strings.py:7
↓ 1 callersMethodbeforeAndAfterPuzzles
(self, phrases)
before_and_after_puzzle.py:8
↓ 1 callersFunctionbestseats
(seats)
best_subway_seat.py:10
↓ 1 callersFunctionbin_search
(left, right)
find_first_positive_number.py:13
↓ 1 callersMethodbinaryGap
:type n: int :rtype: int
binary_gap.py:9
↓ 1 callersMethodbreak_array
(self, root,nums)
maximum_binary_tree.py:22
↓ 1 callersMethodbubblesort
:type list: list :rtype: list
bubble_sort.py:7
↓ 1 callersFunctionbuildhashmap
(key, value)
expiring_hashtable.py:7
↓ 1 callersMethodcalc
(self, n)
climbing_stairs.py:8
↓ 1 callersMethodcalculateTime
(self, keyboard, word)
single_row_keyboard.py:9
↓ 1 callersMethodcanConstruct
(self, ransomNote: 'str', magazine: 'str')
ransom_note.py:10
↓ 1 callersMethodcanConvert
(self, str1: str, str2: str)
string_transforms_into_another_string.py:7
↓ 1 callersFunctioncanMake
(string1, string2)
can_make_string_from_another.py:6
↓ 1 callersMethodcanPermutePalindrome
(self, s)
palindrome_permutation.py:6
↓ 1 callersMethodcanPlaceFlowers
(self, flowerbed, n)
can_place_flowers.py:9
↓ 1 callersMethodcanVisitAllRooms
(self, rooms)
keys_and_rooms.py:8
↓ 1 callersMethodcanWinNim
(self, n: int)
nim_game.py:9
↓ 1 callersMethodcandy
:param ratings: List[int] :return: int
candy.py:8
↓ 1 callersMethodcandyCrush
(self, board)
candy_crush.py:9
↓ 1 callersMethodcarPooling
(self, trips, capacity)
car_pooling.py:9
↓ 1 callersMethodcheckRecord
(self, s)
student_attendance_record_i.py:9
↓ 1 callersMethodcheckStraightLine
(self, coordinates)
check_if_it_is_a_straight_line.py:8
↓ 1 callersMethodclimbStairs
:type n: int :rtype: int
climbing_stairs.py:18
↓ 1 callersMethodclosedIsland
(self, grid)
number_of_closed_islands.py:7
↓ 1 callersMethodcommonChars
(self, A)
find_common_characters.py:8
↓ 1 callersMethodconfusingNumber
(self, N)
confusing_number.py:8
↓ 1 callersMethodconnectSticks
(self, sticks)
minimum_cost_to_connect_sticks.py:9
↓ 1 callersMethodcontainsDuplicate
(self, nums)
contains_duplicate.py:8
↓ 1 callersMethodcontainsNearbyDuplicate
(self, nums, k)
contains_duplicate_ii.py:10
↓ 1 callersMethodconvertToBase7
(self, num: int)
base_7.py:4
↓ 1 callersMethodcorpFlightBookings
(self, bookings, n)
corporate_flight_bookings.py:8
↓ 1 callersMethodcountBits
(self, num)
counting_bits.py:7
↓ 1 callersMethodcountCharacters
(self, words, chars)
find_words_that_can_be_formed_by_characters.py:9
↓ 1 callersMethodcountLetters
(self, S)
count_substrings_with_only_one_distinct_letter.py:8
↓ 1 callersFunctioncreate_stack
()
stack.py:25
↓ 1 callersMethodcustomSortString
(self, S, T)
custom_sort_string.py:10
↓ 1 callersMethoddecode
:param shorturl: str :return: str
encode_and_decode_tinyurl.py:35
↓ 1 callersMethoddefangIPaddr
(self, address)
defanging_an_ip_address.py:8
↓ 1 callersMethoddetectCapitalUse
:type word: str :rtype: bool
detect_capital.py:8
↓ 1 callersMethoddiStringMatch
(self, S)
di_string_match.py:9
↓ 1 callersMethoddifferByOne
(self, dict)
strings_differ_by_one_character.py:6
↓ 1 callersMethoddistanceBetweenBusStops
(self, distance, start, destination)
distance_between_bus_stops.py:10
↓ 1 callersMethoddistributeCandies
(self, candies, num_people)
distribute_candies_to_people.py:9
↓ 1 callersMethodduplicateZeros
Do not return anything, modify arr in-place instead.
duplicate_zeros.py:8
↓ 1 callersMethodencode
(self, num)
encode_number.py:8
↓ 1 callersMethodencode
:param longurl: str :return: str
encode_and_decode_tinyurl.py:20
↓ 1 callersMethodexist
(self, board, word)
word_search.py:13
↓ 1 callersMethodfib
(self, N: int)
fibonacci_number.py:9
↓ 1 callersFunctionfib_dp
(n)
fibonacci.py:15
↓ 1 callersFunctionfib_slow
(n)
fibonacci.py:6
↓ 1 callersMethodfill
(self, image, rid, cid, newColor, oldColor)
flood_fill.py:8
↓ 1 callersMethodfindComplement
(self, num)
number_complement.py:7
↓ 1 callersMethodfindDisappearedNumbers
(self, nums: 'List[int]')
find_all_numbers.py:7
↓ 1 callersMethodfindDuplicates
(self, nums)
find_all_duplicates_in_an_array.py:7
↓ 1 callersMethodfindDuplicates
(self, nums)
find_all_duplicates_in_an_array_o1_space.py:7
↓ 1 callersMethodfindKthLargest
:type nums: List[int] :type k: int :rtype: int
kth_largest_element_in_an_array.py:11
↓ 1 callersMethodfindLengthOfLCIS
(self, nums)
longest_continuous_increasing_subsequence.py:7
↓ 1 callersMethodfindLonelyPixel
(self, picture)
lonely_pixel-i.py:11
↓ 1 callersMethodfindMaxConsecutiveOnes
(self, nums)
max_consecutive_sums.py:9
↓ 1 callersMethodfindMedianSortedArrays
:type: nums1: List[int] :type: nums2: List[int] :return: float
median_of_two_sorted_arrays.py:10
↓ 1 callersMethodfindOcurrences
(self, text: str, first: str, second: str)
occurrences_after_bigram.py:11
↓ 1 callersMethodfindPeakElement
Find the peak element (element greater than neighbors)
find_peak_element.py:9
↓ 1 callersMethodfindPoisonedDuration
(self, timeSeries, duration)
teemo_attacking.py:8
↓ 1 callersMethodfindRepeatedDnaSequences
(self, s)
repeated_dna_sequences.py:7
↓ 1 callersMethodfindTheDifference
(self, s, t)
find_the_difference.py:10
↓ 1 callersMethodfindUnsortedSubarray
(self, nums)
shortest_unsorted_continuous_subarray.py:8
↓ 1 callersMethodfindWords
(self, words)
keyboard_row.py:8
↓ 1 callersFunctionfind_first_positive
Function to return first positive in monotonically increasing fx
find_first_positive_number.py:24
↓ 1 callersMethodfirstUniqChar
:type s: str :rtype: int
first_unique_character.py:8
↓ 1 callersMethodfixedPoint
(self, A)
fixed_point.py:9
↓ 1 callersMethodfizzBuzz
(self, n: 'int')
fizz-buzz.py:8
next →1–100 of 440, ranked by callers