Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ByteByteGoHq/coding-interview-patterns
/ functions
Functions
1,014 in github.com/ByteByteGoHq/coding-interview-patterns
⨍
Functions
1,014
◇
Types & classes
253
Function
flatten_multi_level_list
(head: MultiLevelListNode)
python3/Linked Lists/flatten_multi_level_list.py:13
Function
gasStations
kotlin/Greedy/GasStations.kt:1
Function
gasStations
cpp/Greedy/gas_stations.cpp:4
Method
gasStations
(int[] gas, int[] cost)
java/Greedy/GasStations.java:4
Function
gas_stations
(gas: List[int], cost: List[int])
python3/Greedy/gas_stations.py:4
Function
geometricSequenceTriplets
kotlin/Hash Maps and Sets/GeometricSequenceTriplets.kt:1
Function
geometricSequenceTriplets
cpp/Hash Maps and Sets/geometric_sequence_triplets.cpp:4
Function
geometricSequenceTriplets
(nums: number[], r: number)
typescript/Hash Maps and Sets/geometric_sequence_triplets.ts:1
Function
geometricSequenceTriplets
(nums []int, r int)
go/Hash Maps and Sets/geometric_sequence_triplets.go:1
Method
geometricSequenceTriplets
(int[] nums, int r)
java/Hash Maps and Sets/GeometricSequenceTriplets.java:5
Function
geometric_sequence_triplets
(nums: Vec<i32>, r: i32)
rust/Hash Maps and Sets/geometric_sequence_triplets.rs:3
Function
geometric_sequence_triplets
(nums: List[int], r: int)
python3/Hash Maps and Sets/geometric_sequence_triplets.py:5
Method
getCommunitySize
kotlin/Graphs/MergingCommunities.kt:46
Method
getCommunitySize
cpp/Graphs/merging_communities.cpp:55
Method
getCommunitySize
(int x)
java/Graphs/MergingCommunities.java:59
Method
getMedian
kotlin/Heaps/MedianOfAnIntegerStream.kt:28
Method
getMedian
cpp/Heaps/median_of_an_integer_stream.cpp:31
Method
getMedian
()
java/Heaps/MedianOfAnIntegerStream.java:36
Method
getNextNum
(int x)
csharp/Fast and Slow Pointers/HappyNumber.cs:22
Method
get_community_size
(self, x: int)
python3/Graphs/merging_communities.py:37
Method
get_median
(self)
python3/Heaps/median_of_an_integer_stream.py:26
Function
graphDeepCopy
kotlin/Graphs/GraphDeepCopy.kt:11
Function
graphDeepCopy
cpp/Graphs/graph_deep_copy.cpp:19
Method
graphDeepCopy
(GraphNode node)
java/Graphs/GraphDeepCopy.java:19
Function
graph_deep_copy
(node: GraphNode)
python3/Graphs/graph_deep_copy.py:12
Function
hammingWeightsOfIntegers
kotlin/Bit Manipulation/HammingWeightsOfIntegers.kt:1
Function
hammingWeightsOfIntegers
cpp/Bit Manipulation/hamming_weights_of_integers.cpp:3
Method
hammingWeightsOfIntegers
(int n)
java/Bit Manipulation/HammingWeightsOfIntegers.java:2
Function
hammingWeightsOfIntegersDp
kotlin/Bit Manipulation/HammingWeightsOfIntegersDp.kt:1
Function
hammingWeightsOfIntegersDp
cpp/Bit Manipulation/hamming_weights_of_integers_dp.cpp:3
Method
hammingWeightsOfIntegersDp
(int n)
java/Bit Manipulation/HammingWeightsOfIntegersDp.java:2
Function
hamming_weights_of_integers
(n: int)
python3/Bit Manipulation/hamming_weights_of_integers.py:4
Function
hamming_weights_of_integers_dp
(n: int)
python3/Bit Manipulation/hamming_weights_of_integers_dp.py:4
Function
happyNumber
kotlin/Fast and Slow Pointers/HappyNumber.kt:1
Function
happyNumber
cpp/Fast and Slow Pointers/happy_number.cpp:1
Function
happyNumber
(n: number)
typescript/Fast and Slow Pointers/happy_number.ts:1
Method
happyNumber
(int n)
java/Fast and Slow Pointers/HappyNumber.java:2
Function
happy_number
(n: int)
python3/Fast and Slow Pointers/happy_number.py:1
Method
hasPrefix
kotlin/Tries/DesignATrie.kt:38
Method
hasPrefix
cpp/Tries/design_a_trie.cpp:56
Method
hasPrefix
(String prefix)
java/Tries/DesignATrie.java:48
Method
has_prefix
(self, prefix: str)
python3/Tries/design_a_trie.py:35
Function
identifyAllIntervalOverlaps
kotlin/Intervals/IdentifyAllIntervalOverlaps.kt:8
Function
identifyAllIntervalOverlaps
cpp/Intervals/identify_all_interval_overlaps.cpp:15
Method
identifyAllIntervalOverlaps
(List<Interval> intervals1, List<Interval> intervals2)
java/Intervals/IdentifyAllIntervalOverlaps.java:19
Function
identify_all_interval_overlaps
(intervals1: List[Interval], intervals2: List[Interval])
python3/Intervals/identify_all_interval_overlaps.py:13
Method
insert
kotlin/Tries/InsertAndSearchWordsWithWildcards.kt:9
Method
insert
cpp/Tries/insert_and_search_words_with_wildcards.cpp:26
Method
insert
(self, word: str)
python3/Tries/insert_and_search_words_with_wildcards.py:10
Method
insert
(self, word: str)
python3/Tries/design_a_trie.py:11
Method
insert
(String word)
java/Tries/DesignATrie.java:20
Method
insert
(String word)
java/Tries/InsertAndSearchWordsWithWildcards.java:20
Function
invertBinaryTreeIterative
kotlin/Trees/InvertBinaryTreeIteretive.kt:14
Function
invertBinaryTreeIterative
cpp/Trees/invert_binary_tree_iterative.cpp:17
Method
invertBinaryTreeIterative
(TreeNode root)
java/Trees/InvertBinaryTreeIterative.java:18
Function
invertBinaryTreeRecursive
kotlin/Trees/InvertBinaryTreeRecursive.kt:13
Function
invertBinaryTreeRecursive
cpp/Trees/invert_binary_tree_recursive.cpp:16
Method
invertBinaryTreeRecursive
(TreeNode root)
java/Trees/InvertBinaryTreeRecursive.java:16
Function
invert_binary_tree_iterative
(root: TreeNode)
python3/Trees/invert_binary_tree_iterative.py:13
Function
invert_binary_tree_recursive
(root: TreeNode)
python3/Trees/invert_binary_tree_recursive.py:13
Function
isPalindromeValid
kotlin/Two Pointers/IsPalindromeValid.kt:1
Function
isPalindromeValid
cpp/Two Pointers/is_palindrome_valid.cpp:4
Function
isPalindromeValid
(s: string)
typescript/Two Pointers/is_palindrome_valid.ts:1
Function
isPalindromeValid
(input string)
go/Two Pointers/is_palindrome_valid.go:1
Method
isPalindromeValid
(String s)
java/Two Pointers/IsPalindromeValid.java:3
Function
is_palindrome_valid
(s: &str)
rust/Two Pointers/is_palindrome_valid.rs:1
Function
is_palindrome_valid
(s: str)
python3/Two Pointers/is_palindrome_valid.py:1
Function
josephus
kotlin/Math and Geometry/Josephus.kt:1
Function
josephus
cpp/Math and Geometry/josephus.cpp:1
Function
josephus
(n: int, k: int)
python3/Math and Geometry/josephus.py:1
Function
josephusOptimized
kotlin/Math and Geometry/JosephusOptimized.kt:1
Function
josephusOptimized
cpp/Math and Geometry/josephus_optimized.cpp:1
Function
josephus_optimized
(n: int, k: int)
python3/Math and Geometry/josephus_optimized.py:1
Function
jumpToTheEnd
kotlin/Greedy/JumpToTheEnd.kt:1
Function
jumpToTheEnd
cpp/Greedy/jump_to_the_end.cpp:3
Method
jumpToTheEnd
(int[] nums)
java/Greedy/JumpToTheEnd.java:2
Function
jump_to_the_end
(nums: List[int])
python3/Greedy/jump_to_the_end.py:4
Function
kMostFrequentStringsMaxHeap
kotlin/Heaps/KMostFrequentStringsMaxHeap.kt:5
Function
kMostFrequentStringsMaxHeap
cpp/Heaps/k_most_frequent_strings_max_heap.cpp:6
Method
kMostFrequentStringsMaxHeap
(String[] strs, int k)
java/Heaps/KMostFrequentStringsMaxHeap.java:29
Function
kMostFrequentStringsMinHeap
kotlin/Heaps/KMostFrequentStringsMinHeap.kt:5
Function
kMostFrequentStringsMinHeap
cpp/Heaps/k_most_frequent_strings_min_heap.cpp:7
Method
kMostFrequentStringsMinHeap
(String[] strs, int k)
java/Heaps/KMostFrequentStringsMinHeap.java:27
Function
kSumSubarrays
kotlin/Prefix Sums/KSumSubarrays.kt:1
Function
kSumSubarrays
cpp/Prefix Sums/k_sum_subarrays.cpp:3
Method
kSumSubarrays
(int[] nums, int k)
java/Prefix Sums/KSumSubarrays.java:2
Function
kSumSubarraysOptimized
kotlin/Prefix Sums/KSumSubarraysOptimized.kt:1
Function
kSumSubarraysOptimized
cpp/Prefix Sums/k_sum_subarrays_optimized.cpp:4
Method
kSumSubarraysOptimized
(int[] nums, int k)
java/Prefix Sums/KSumSubarraysOptimized.java:5
Function
k_most_frequent_strings_max_heap
(strs: List[str], k: int)
python3/Heaps/k_most_frequent_strings_max_heap.py:20
Function
k_most_frequent_strings_min_heap
(strs: List[str], k: int)
python3/Heaps/k_most_frequent_strings_min_heap.py:18
Function
k_sum_subarrays
(nums: List[int], k: int)
python3/Prefix Sums/k_sum_subarrays.py:4
Function
k_sum_subarrays_optimized
(nums: List[int], k: int)
python3/Prefix Sums/k_sum_subarrays_optimized.py:4
Function
knapsack
kotlin/Dynamic Programming/Knapsack.kt:1
Function
knapsack
cpp/Dynamic Programming/knapsack.cpp:4
Function
knapsack
(cap: int, weights: List[int], values: List[int])
python3/Dynamic Programming/knapsack.py:4
Method
knapsack
(int cap, int[] weights, int[] values)
java/Dynamic Programming/Knapsack.java:2
Function
knapsackOptimized
kotlin/Dynamic Programming/KnapsackOptimized.kt:1
Function
knapsackOptimized
cpp/Dynamic Programming/knapsack_optimized.cpp:4
Method
knapsackOptimized
(int cap, int[] weights, int[] values)
java/Dynamic Programming/KnapsackOptimized.java:2
← previous
next →
501–600 of 1,014, ranked by callers