Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/black-shadows/Cracking-the-Coding-Interview
/ functions
Functions
382 in github.com/black-shadows/Cracking-the-Coding-Interview
⨍
Functions
382
◇
Types & classes
42
↓ 53 callers
Method
size
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:32
↓ 28 callers
Method
push
Solutions/Chapter 3 Stacks and Queues/3.2.cpp:56
↓ 25 callers
Method
top
Solutions/Chapter 3 Stacks and Queues/3.2.cpp:62
↓ 17 callers
Method
empty
* @brief Returns true if the rectangle has area zero, false otherwise. * @note Complexity: O(1) in both time and space. */
Solutions/Chapter 20 Hard/20.13.cpp:219
↓ 16 callers
Method
pop
Solutions/Chapter 3 Stacks and Queues/3.2.cpp:59
↓ 12 callers
Method
front
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:24
↓ 10 callers
Function
count_one
Solutions/Chapter 5 Bit Manipulation/5.3.cpp:18
↓ 8 callers
Method
empty
Solutions/Chapter 3 Stacks and Queues/3.2.cpp:65
↓ 8 callers
Method
find
Solutions/Chapter 20 Hard/hash.h:48
↓ 7 callers
Method
back
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:28
↓ 7 callers
Method
empty
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:35
↓ 7 callers
Method
empty
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:38
↓ 7 callers
Function
height
Solutions/Chapter 4 Trees and Graphs/4.3.cpp:40
↓ 7 callers
Method
push
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:16
↓ 6 callers
Method
push
Solutions/Chapter 3 Stacks and Queues/3.1.cpp:18
↓ 5 callers
Method
insert
Solutions/Chapter 20 Hard/hash.h:39
↓ 5 callers
Function
negative
* @brief Computes -a using only additions (-a = a + (-2)*a). * @note Complexity: O(|a|) in time, O(1) in space. */
Solutions/Chapter 10 Mathematical/10.4.cpp:16
↓ 5 callers
Method
pop
Solutions/Chapter 3 Stacks and Queues/3.5.cpp:20
↓ 5 callers
Function
removeDuplicate1
Solutions/Chapter 1 Arrays and Strings/1.3.cpp:13
↓ 5 callers
Function
removeDuplicate2
Solutions/Chapter 1 Arrays and Strings/1.3.cpp:31
↓ 5 callers
Function
removeDuplicate5
Solutions/Chapter 1 Arrays and Strings/1.3.cpp:85
↓ 4 callers
Method
full
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:41
↓ 4 callers
Method
height
* @brief Returns the height of the rectangle. * @note Complexity: O(1) in both time and space. */
Solutions/Chapter 20 Hard/20.13.cpp:210
↓ 4 callers
Function
magnitude
* @brief Computes |a| using only additions. * @note Complexity: O(|a|) in time, O(1) in space. */
Solutions/Chapter 10 Mathematical/10.4.cpp:44
↓ 4 callers
Function
max
Solutions/Chapter 20 Hard/20.11.cpp:18
↓ 4 callers
Method
pop
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:32
↓ 4 callers
Function
print_binary
Solutions/Chapter 5 Bit Manipulation/5.6.cpp:10
↓ 4 callers
Function
swap
Solutions/Chapter 1 Arrays and Strings/1.2.cpp:9
↓ 4 callers
Method
width
* @brief Returns the width of the rectangle. * @note Complexity: O(1) in both time and space. */
Solutions/Chapter 20 Hard/20.13.cpp:201
↓ 3 callers
Function
fact
Solutions/Chapter 8 Recursion/8.2.cpp:27
↓ 3 callers
Function
father
Solutions/Chapter 4 Trees and Graphs/4.6.cpp:54
↓ 3 callers
Method
find
* @brief Returns true if a given word is in the dictionary, false * otherwise. * @note Complexity: O(n) in time, O(1) in space, whe
Solutions/Chapter 20 Hard/20.13.cpp:86
↓ 3 callers
Method
min
Solutions/Chapter 3 Stacks and Queues/3.2.cpp:39
↓ 3 callers
Method
popAt
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:102
↓ 3 callers
Function
print
Solutions/Chapter 2 Linked Lists/2.4.cpp:86
↓ 3 callers
Function
print_binary
Solutions/Chapter 5 Bit Manipulation/5.1.cpp:11
↓ 3 callers
Method
push
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:29
↓ 3 callers
Method
top
Solutions/Chapter 3 Stacks and Queues/3.1.cpp:26
↓ 2 callers
Function
CheckDiagonal
Solutions/Chapter 19 Moderate/19.2.cpp:41
↓ 2 callers
Function
CheckRowColumn
Solutions/Chapter 19 Moderate/19.2.cpp:13
↓ 2 callers
Function
build_all_lines
* @brief Returns a vector with all lines which connect each pair of points * on an array with n distinct points. * @note Complexity: O(n²)
Solutions/Chapter 10 Mathematical/10.6.cpp:19
↓ 2 callers
Function
create_minimal_tree
Solutions/Chapter 4 Trees and Graphs/4.7.cpp:24
↓ 2 callers
Function
init
Solutions/Chapter 2 Linked Lists/2.4.cpp:19
↓ 2 callers
Function
insert
Solutions/Chapter 4 Trees and Graphs/BST.cpp:21
↓ 2 callers
Function
isUnique1
Solutions/Chapter 1 Arrays and Strings/1.1.cpp:9
↓ 2 callers
Function
isUnique2
Solutions/Chapter 1 Arrays and Strings/1.1.cpp:23
↓ 2 callers
Function
maximum
Solutions/Chapter 4 Trees and Graphs/BST.cpp:58
↓ 2 callers
Function
minimum
Solutions/Chapter 4 Trees and Graphs/BST.cpp:51
↓ 2 callers
Function
mul
Solutions/Chapter 8 Recursion/8.1.cpp:28
↓ 2 callers
Function
print
Solutions/Chapter 2 Linked Lists/2.3.cpp:50
↓ 2 callers
Function
print_subsets
Solutions/Chapter 8 Recursion/8.3.cpp:55
↓ 2 callers
Function
replace1
Solutions/Chapter 1 Arrays and Strings/1.5.cpp:9
↓ 2 callers
Function
search
Solutions/Chapter 4 Trees and Graphs/4.6.cpp:80
↓ 2 callers
Method
subcolumn
* @brief Returns the topmost contiguous sequence of defined characters * at the j-th column. * @note Complexity: O(height) in both
Solutions/Chapter 20 Hard/20.13.cpp:183
↓ 2 callers
Method
subrow
* @brief Returns the leftmost contiguous sequence of defined characters * at the i-th row. * @note Complexity: O(width) in both tim
Solutions/Chapter 20 Hard/20.13.cpp:164
↓ 2 callers
Function
swap
Solutions/Chapter 9 Sorting and Searching/9.1.1.cpp:8
↓ 2 callers
Function
swap
Solutions/Chapter 1 Arrays and Strings/1.6.cpp:15
↓ 2 callers
Method
top
Solutions/Chapter 3 Stacks and Queues/3.3.cpp:35
↓ 2 callers
Method
valid_next_chars
* @brief Given a word prefix, returns a bitmask indicating what are the * possible next characters if the prefix is assumed to be part
Solutions/Chapter 20 Hard/20.13.cpp:67
↓ 1 callers
Function
Add1
Solutions/Chapter 20 Hard/20.1.cpp:9
↓ 1 callers
Function
Add2
Solutions/Chapter 20 Hard/20.1.cpp:15
↓ 1 callers
Function
Add3
Solutions/Chapter 20 Hard/20.1.cpp:23
↓ 1 callers
Function
Count2
Solutions/Chapter 20 Hard/20.4.cpp:8
↓ 1 callers
Function
Count2s
Solutions/Chapter 20 Hard/20.4.cpp:30
↓ 1 callers
Function
Count2s1
Solutions/Chapter 20 Hard/20.4.cpp:20
↓ 1 callers
Function
Countis
Solutions/Chapter 20 Hard/20.4.cpp:60
↓ 1 callers
Function
Estimate
Solutions/Chapter 19 Moderate/19.5.cpp:24
↓ 1 callers
Function
Estimate1
Solutions/Chapter 19 Moderate/19.5.cpp:50
↓ 1 callers
Function
FindSubSquare
Solutions/Chapter 20 Hard/20.11.cpp:39
↓ 1 callers
Function
GetMaxSum
Solutions/Chapter 19 Moderate/19.7.cpp:14
↓ 1 callers
Method
GetValue
Solutions/Chapter 20 Hard/20.9.cpp:54
↓ 1 callers
Function
HasWon
Solutions/Chapter 19 Moderate/19.2.cpp:68
↓ 1 callers
Method
Insert
Solutions/Chapter 20 Hard/20.9.cpp:24
↓ 1 callers
Function
IsSquare
Solutions/Chapter 20 Hard/20.11.cpp:23
↓ 1 callers
Function
MakeOfWords
Solutions/Chapter 20 Hard/20.7.cpp:16
↓ 1 callers
Function
Max1
Solutions/Chapter 19 Moderate/19.4.cpp:8
↓ 1 callers
Function
Max2
Solutions/Chapter 19 Moderate/19.4.cpp:16
↓ 1 callers
Function
MaxSum
Solutions/Chapter 20 Hard/20.12.cpp:22
↓ 1 callers
Method
MethodA
Solutions/Chapter 13 CPP/13.6.cpp:10
↓ 1 callers
Function
Min
Solutions/Chapter 19 Moderate/19.5.cpp:45
↓ 1 callers
Function
NumZero1
Solutions/Chapter 19 Moderate/19.3.cpp:19
↓ 1 callers
Function
NumZeros
Solutions/Chapter 19 Moderate/19.3.cpp:8
↓ 1 callers
Function
PickMRandomly
Solutions/Chapter 20 Hard/20.3.cpp:16
↓ 1 callers
Function
PreCompute
Solutions/Chapter 20 Hard/20.12.cpp:13
↓ 1 callers
Function
PrintLongestWord
Solutions/Chapter 20 Hard/20.7.cpp:34
↓ 1 callers
Function
PrintPairSum
Solutions/Chapter 19 Moderate/19.11.cpp:9
↓ 1 callers
Function
Qsort
Solutions/Chapter 3 Stacks and Queues/3.6.cpp:14
↓ 1 callers
Function
RandomShuffle
Solutions/Chapter 20 Hard/20.2.cpp:18
↓ 1 callers
Function
ShortestDist
Solutions/Chapter 20 Hard/20.5.cpp:13
↓ 1 callers
Function
Swap
Solutions/Chapter 20 Hard/20.2.cpp:12
↓ 1 callers
Function
Swap
Solutions/Chapter 20 Hard/20.3.cpp:10
↓ 1 callers
Function
addlink
Solutions/Chapter 2 Linked Lists/2.4.cpp:37
↓ 1 callers
Function
build_largest_word_rectangle
* @brief Builds the largest rectangle of characters such that each of its rows * and columns forms a word in a given dictionary. * @note Co
Solutions/Chapter 20 Hard/20.13.cpp:325
↓ 1 callers
Function
build_rectangle
* @brief Recursive step on the backtracking implementation; at each call, all * cells rect(0:i, 0:j) except for rect(i,j) are assumed to be a
Solutions/Chapter 20 Hard/20.13.cpp:258
↓ 1 callers
Method
construct
Solutions/Chapter 20 Hard/ac_automation.cpp:51
↓ 1 callers
Function
contain_tree
Solutions/Chapter 4 Trees and Graphs/4.7.cpp:52
↓ 1 callers
Function
convert_num
Solutions/Chapter 5 Bit Manipulation/5.5.cpp:19
↓ 1 callers
Function
count_one
Solutions/Chapter 5 Bit Manipulation/5.5.cpp:10
↓ 1 callers
Function
count_words
* @brief Returns a map containing the number of occurrences of each unique * word read from an input stream. * @note Complexity: O(n*m*log(
Solutions/Chapter 19 Moderate/19.8.cpp:16
↓ 1 callers
Function
createMinimalTree
Solutions/Chapter 4 Trees and Graphs/4.4.cpp:27
next →
1–100 of 382, ranked by callers