MCPcopy Create free account

hub / github.com/ByteByteGoHq/coding-interview-patterns / functions

Functions1,014 in github.com/ByteByteGoHq/coding-interview-patterns

Functionflatten_multi_level_list
(head: MultiLevelListNode)
python3/Linked Lists/flatten_multi_level_list.py:13
FunctiongasStations
kotlin/Greedy/GasStations.kt:1
FunctiongasStations
cpp/Greedy/gas_stations.cpp:4
MethodgasStations
(int[] gas, int[] cost)
java/Greedy/GasStations.java:4
Functiongas_stations
(gas: List[int], cost: List[int])
python3/Greedy/gas_stations.py:4
FunctiongeometricSequenceTriplets
kotlin/Hash Maps and Sets/GeometricSequenceTriplets.kt:1
FunctiongeometricSequenceTriplets
cpp/Hash Maps and Sets/geometric_sequence_triplets.cpp:4
FunctiongeometricSequenceTriplets
(nums: number[], r: number)
typescript/Hash Maps and Sets/geometric_sequence_triplets.ts:1
FunctiongeometricSequenceTriplets
(nums []int, r int)
go/Hash Maps and Sets/geometric_sequence_triplets.go:1
MethodgeometricSequenceTriplets
(int[] nums, int r)
java/Hash Maps and Sets/GeometricSequenceTriplets.java:5
Functiongeometric_sequence_triplets
(nums: Vec<i32>, r: i32)
rust/Hash Maps and Sets/geometric_sequence_triplets.rs:3
Functiongeometric_sequence_triplets
(nums: List[int], r: int)
python3/Hash Maps and Sets/geometric_sequence_triplets.py:5
MethodgetCommunitySize
kotlin/Graphs/MergingCommunities.kt:46
MethodgetCommunitySize
cpp/Graphs/merging_communities.cpp:55
MethodgetCommunitySize
(int x)
java/Graphs/MergingCommunities.java:59
MethodgetMedian
kotlin/Heaps/MedianOfAnIntegerStream.kt:28
MethodgetMedian
cpp/Heaps/median_of_an_integer_stream.cpp:31
MethodgetMedian
()
java/Heaps/MedianOfAnIntegerStream.java:36
MethodgetNextNum
(int x)
csharp/Fast and Slow Pointers/HappyNumber.cs:22
Methodget_community_size
(self, x: int)
python3/Graphs/merging_communities.py:37
Methodget_median
(self)
python3/Heaps/median_of_an_integer_stream.py:26
FunctiongraphDeepCopy
kotlin/Graphs/GraphDeepCopy.kt:11
FunctiongraphDeepCopy
cpp/Graphs/graph_deep_copy.cpp:19
MethodgraphDeepCopy
(GraphNode node)
java/Graphs/GraphDeepCopy.java:19
Functiongraph_deep_copy
(node: GraphNode)
python3/Graphs/graph_deep_copy.py:12
FunctionhammingWeightsOfIntegers
kotlin/Bit Manipulation/HammingWeightsOfIntegers.kt:1
FunctionhammingWeightsOfIntegers
cpp/Bit Manipulation/hamming_weights_of_integers.cpp:3
MethodhammingWeightsOfIntegers
(int n)
java/Bit Manipulation/HammingWeightsOfIntegers.java:2
FunctionhammingWeightsOfIntegersDp
kotlin/Bit Manipulation/HammingWeightsOfIntegersDp.kt:1
FunctionhammingWeightsOfIntegersDp
cpp/Bit Manipulation/hamming_weights_of_integers_dp.cpp:3
MethodhammingWeightsOfIntegersDp
(int n)
java/Bit Manipulation/HammingWeightsOfIntegersDp.java:2
Functionhamming_weights_of_integers
(n: int)
python3/Bit Manipulation/hamming_weights_of_integers.py:4
Functionhamming_weights_of_integers_dp
(n: int)
python3/Bit Manipulation/hamming_weights_of_integers_dp.py:4
FunctionhappyNumber
kotlin/Fast and Slow Pointers/HappyNumber.kt:1
FunctionhappyNumber
cpp/Fast and Slow Pointers/happy_number.cpp:1
FunctionhappyNumber
(n: number)
typescript/Fast and Slow Pointers/happy_number.ts:1
MethodhappyNumber
(int n)
java/Fast and Slow Pointers/HappyNumber.java:2
Functionhappy_number
(n: int)
python3/Fast and Slow Pointers/happy_number.py:1
MethodhasPrefix
kotlin/Tries/DesignATrie.kt:38
MethodhasPrefix
cpp/Tries/design_a_trie.cpp:56
MethodhasPrefix
(String prefix)
java/Tries/DesignATrie.java:48
Methodhas_prefix
(self, prefix: str)
python3/Tries/design_a_trie.py:35
FunctionidentifyAllIntervalOverlaps
kotlin/Intervals/IdentifyAllIntervalOverlaps.kt:8
FunctionidentifyAllIntervalOverlaps
cpp/Intervals/identify_all_interval_overlaps.cpp:15
MethodidentifyAllIntervalOverlaps
(List<Interval> intervals1, List<Interval> intervals2)
java/Intervals/IdentifyAllIntervalOverlaps.java:19
Functionidentify_all_interval_overlaps
(intervals1: List[Interval], intervals2: List[Interval])
python3/Intervals/identify_all_interval_overlaps.py:13
Methodinsert
kotlin/Tries/InsertAndSearchWordsWithWildcards.kt:9
Methodinsert
cpp/Tries/insert_and_search_words_with_wildcards.cpp:26
Methodinsert
(self, word: str)
python3/Tries/insert_and_search_words_with_wildcards.py:10
Methodinsert
(self, word: str)
python3/Tries/design_a_trie.py:11
Methodinsert
(String word)
java/Tries/DesignATrie.java:20
Methodinsert
(String word)
java/Tries/InsertAndSearchWordsWithWildcards.java:20
FunctioninvertBinaryTreeIterative
kotlin/Trees/InvertBinaryTreeIteretive.kt:14
FunctioninvertBinaryTreeIterative
cpp/Trees/invert_binary_tree_iterative.cpp:17
MethodinvertBinaryTreeIterative
(TreeNode root)
java/Trees/InvertBinaryTreeIterative.java:18
FunctioninvertBinaryTreeRecursive
kotlin/Trees/InvertBinaryTreeRecursive.kt:13
FunctioninvertBinaryTreeRecursive
cpp/Trees/invert_binary_tree_recursive.cpp:16
MethodinvertBinaryTreeRecursive
(TreeNode root)
java/Trees/InvertBinaryTreeRecursive.java:16
Functioninvert_binary_tree_iterative
(root: TreeNode)
python3/Trees/invert_binary_tree_iterative.py:13
Functioninvert_binary_tree_recursive
(root: TreeNode)
python3/Trees/invert_binary_tree_recursive.py:13
FunctionisPalindromeValid
kotlin/Two Pointers/IsPalindromeValid.kt:1
FunctionisPalindromeValid
cpp/Two Pointers/is_palindrome_valid.cpp:4
FunctionisPalindromeValid
(s: string)
typescript/Two Pointers/is_palindrome_valid.ts:1
FunctionisPalindromeValid
(input string)
go/Two Pointers/is_palindrome_valid.go:1
MethodisPalindromeValid
(String s)
java/Two Pointers/IsPalindromeValid.java:3
Functionis_palindrome_valid
(s: &str)
rust/Two Pointers/is_palindrome_valid.rs:1
Functionis_palindrome_valid
(s: str)
python3/Two Pointers/is_palindrome_valid.py:1
Functionjosephus
kotlin/Math and Geometry/Josephus.kt:1
Functionjosephus
cpp/Math and Geometry/josephus.cpp:1
Functionjosephus
(n: int, k: int)
python3/Math and Geometry/josephus.py:1
FunctionjosephusOptimized
kotlin/Math and Geometry/JosephusOptimized.kt:1
FunctionjosephusOptimized
cpp/Math and Geometry/josephus_optimized.cpp:1
Functionjosephus_optimized
(n: int, k: int)
python3/Math and Geometry/josephus_optimized.py:1
FunctionjumpToTheEnd
kotlin/Greedy/JumpToTheEnd.kt:1
FunctionjumpToTheEnd
cpp/Greedy/jump_to_the_end.cpp:3
MethodjumpToTheEnd
(int[] nums)
java/Greedy/JumpToTheEnd.java:2
Functionjump_to_the_end
(nums: List[int])
python3/Greedy/jump_to_the_end.py:4
FunctionkMostFrequentStringsMaxHeap
kotlin/Heaps/KMostFrequentStringsMaxHeap.kt:5
FunctionkMostFrequentStringsMaxHeap
cpp/Heaps/k_most_frequent_strings_max_heap.cpp:6
MethodkMostFrequentStringsMaxHeap
(String[] strs, int k)
java/Heaps/KMostFrequentStringsMaxHeap.java:29
FunctionkMostFrequentStringsMinHeap
kotlin/Heaps/KMostFrequentStringsMinHeap.kt:5
FunctionkMostFrequentStringsMinHeap
cpp/Heaps/k_most_frequent_strings_min_heap.cpp:7
MethodkMostFrequentStringsMinHeap
(String[] strs, int k)
java/Heaps/KMostFrequentStringsMinHeap.java:27
FunctionkSumSubarrays
kotlin/Prefix Sums/KSumSubarrays.kt:1
FunctionkSumSubarrays
cpp/Prefix Sums/k_sum_subarrays.cpp:3
MethodkSumSubarrays
(int[] nums, int k)
java/Prefix Sums/KSumSubarrays.java:2
FunctionkSumSubarraysOptimized
kotlin/Prefix Sums/KSumSubarraysOptimized.kt:1
FunctionkSumSubarraysOptimized
cpp/Prefix Sums/k_sum_subarrays_optimized.cpp:4
MethodkSumSubarraysOptimized
(int[] nums, int k)
java/Prefix Sums/KSumSubarraysOptimized.java:5
Functionk_most_frequent_strings_max_heap
(strs: List[str], k: int)
python3/Heaps/k_most_frequent_strings_max_heap.py:20
Functionk_most_frequent_strings_min_heap
(strs: List[str], k: int)
python3/Heaps/k_most_frequent_strings_min_heap.py:18
Functionk_sum_subarrays
(nums: List[int], k: int)
python3/Prefix Sums/k_sum_subarrays.py:4
Functionk_sum_subarrays_optimized
(nums: List[int], k: int)
python3/Prefix Sums/k_sum_subarrays_optimized.py:4
Functionknapsack
kotlin/Dynamic Programming/Knapsack.kt:1
Functionknapsack
cpp/Dynamic Programming/knapsack.cpp:4
Functionknapsack
(cap: int, weights: List[int], values: List[int])
python3/Dynamic Programming/knapsack.py:4
Methodknapsack
(int cap, int[] weights, int[] values)
java/Dynamic Programming/Knapsack.java:2
FunctionknapsackOptimized
kotlin/Dynamic Programming/KnapsackOptimized.kt:1
FunctionknapsackOptimized
cpp/Dynamic Programming/knapsack_optimized.cpp:4
MethodknapsackOptimized
(int cap, int[] weights, int[] values)
java/Dynamic Programming/KnapsackOptimized.java:2
← previousnext →501–600 of 1,014, ranked by callers