Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/C-Plus-Plus
/ functions
Functions
2,100 in github.com/TheAlgorithms/C-Plus-Plus
⨍
Functions
2,100
◇
Types & classes
164
Method
operator^
ciphers/uint128_t.hpp:938
Method
operator^
ciphers/uint256_t.hpp:901
Function
operator|
ciphers/uint128_t.hpp:1047
Function
operator|
ciphers/uint256_t.hpp:1014
Method
operator|
ciphers/uint128_t.hpp:893
Method
operator|
ciphers/uint256_t.hpp:856
Function
operator||
ciphers/uint128_t.hpp:1066
Function
operator||
ciphers/uint256_t.hpp:1033
Method
operator||
* @brief operator || for uint128_t * @param b number to be compared with this * @returns true if one of the values are not zero, else false
ciphers/uint128_t.hpp:644
Method
operator||
* @brief operator || for uint256_t * @param b number to be compared with this * @returns true if one of the values are not zero, else false
ciphers/uint256_t.hpp:612
Method
operator~
* \brief Operator overload of '~' on Complex class. * Operator overload of the BITWISE NOT which gives us the conjugate of our * complex num
math/complex_numbers.cpp:130
Method
operator~
* @brief operator ~ for uint128_t * @returns 1's complement of this number */
ciphers/uint128_t.hpp:755
Method
operator~
* @brief operator ~ for uint256_t * @returns 1's complement of this number */
ciphers/uint256_t.hpp:723
Method
orientation
* This function returns the geometric orientation for the three points * in a space, ie, whether they are linear ir clockwise or
geometry/jarvis_algorithm.cpp:133
Method
parent
data_structures/binaryheap.cpp:28
Function
pigeonSort
sorting/pigeonhole_sort.cpp:34
Method
populate_parents
* \brief Calculate the parents for all the vertices in the tree. * Implements the breadth first search algorithm starting from the root * ve
graph/lowest_common_ancestor.cpp:117
Method
populate_up
* Populate the "up" structure. See above. */
graph/lowest_common_ancestor.cpp:212
Function
print
* Iterative function/method to print graph: * @param a adjacency list representation of the graph * @param V number of vertices * @return void **/
graph/kosaraju.cpp:15
Function
print
* @brief Function to print the prime numbers * @param N number till which primes are to be found * @param is_prime a vector of `N + 1` booleans iden
math/sieve_of_eratosthenes.cpp:65
Function
printMat
backtracking/sudoku_solver.cpp:77
Method
printResult
* @brief Utility function for printing the status of each process after * execution * @returns void */
cpu_scheduling_algorithms/fcfs_scheduling.cpp:192
Function
printSolution
backtracking/graph_coloring.cpp:41
Function
printSolution
backtracking/n_queens.cpp:38
Method
push_front
* function adds new element to the beginning of the list * @param new_elem to be added to front of the list */
data_structures/linked_list.cpp:137
Method
query
* @brief This function returns the sum of node values in the simple path * from from node_1 to node_2 * @param a the node where the simple p
range_queries/heavy_light_decomposition.cpp:495
Method
rand_range
ciphers/hill_cipher.cpp:93
Method
randomLevel
* Returns random level of the skip list. * Every higher level is 2 times less likely. * @return random level for skip list */
data_structures/skip_list.cpp:75
Function
relu
* Relu function * @param X Value * @returns relu(x) */
machine_learning/neural_network.cpp:74
Method
removeWordHelper
* A recursive helper function to remove a word from the trie. First, it * recursively traverses to the location of last character of word in the
data_structures/trie_modern.cpp:64
Method
reverseBinaryTree
* @brief Reverses a Binary Tree recursively by swapping the left and * right subtrees and their children. * @param pivot A reference to the
operations_on_datastructures/reverse_binary_tree.cpp:84
Method
right
to get index of right child of node at index i */
data_structures/binaryheap.cpp:34
Method
rightrotate
data_structures/rb_tree.cpp:324
Method
rotate
* @brief Rotate without breaking the property of BST * @param x The node to rotate * @param t 0 represent left hand, while 1 right hand
data_structures/treap.cpp:71
Method
save_model
* Function to save current model. * @param file_name file name to save model (*.model) */
machine_learning/neural_network.cpp:652
Method
searchElement
* Searching element in skip list structure * @param key is number that is used for comparision * @return pointer to the value of the node
data_structures/skip_list.cpp:170
Method
set_sret_init
* @brief Set the initialization for the query data type, based on * requirement * * @details * Change the sret_init, based on requ
range_queries/heavy_light_decomposition.cpp:334
Function
show
sorting/count_inversions.cpp:179
Method
show
* @brief Displays all elements in the stack */
data_structures/stack_using_array.cpp:72
Function
sigmoid
* Sigmoid function * @param X Value * @return Returns sigmoid(x) */
machine_learning/neural_network.cpp:60
Function
solve
backtracking/knight_tour.cpp:57
Function
solveMaze
backtracking/rat_maze.cpp:47
Function
solveNQ
backtracking/n_queens.cpp:91
Function
solveSudoku
backtracking/sudoku_solver.cpp:110
Function
sortcol
cpu_scheduling_algorithms/non_preemptive_sjf_scheduling.cpp:45
Function
sortcol
cpu_scheduling_algorithms/fcfs_scheduling.cpp:46
Function
square
* Square function * @param X Value * @return Returns x * x */
machine_learning/neural_network.cpp:106
Method
stack_linkedList
data_structures/queue_using_linkedlist.cpp:15
Method
std
return sample standard deviation computed till last sample */
math/realtime_stats.cpp:92
Function
struzik_search
search/exponential_search.cpp:59
Method
successor
data_structures/rb_tree.cpp:354
Function
tanh
* Tanh function * @param X Value * @return Returns tanh(x) */
machine_learning/neural_network.cpp:88
Function
test2
* @brief Test function with animation * */
graphics/spirograph.cpp:181
Method
testCase_1
* @brief A test case contains edge case, Only contains one element. * @returns void * */
search/sublist_search.cpp:201
Method
testCase_1
* @brief A test case with single input * @returns void * */
sorting/random_pivot_quick_sort.cpp:214
Method
testCase_1
* @brief A test case contains edge case, printing inorder successor of last * node. * @returns void * */
operations_on_datastructures/inorder_successor_of_bst.cpp:259
Method
testCase_2
* @brief A test case which contains main list of 100 elements and sublist * of 20. * @returns void * */
search/sublist_search.cpp:244
Method
testCase_2
* @brief A test case with input array of length 500 * @returns void * */
sorting/random_pivot_quick_sort.cpp:245
Method
testCase_2
* @brief A test case which contains main list of 100 elements and sublist * of 20. * @returns void * */
operations_on_datastructures/inorder_successor_of_bst.cpp:304
Method
testCase_3
* @brief A test case which contains main list of 50 elements and sublist * of 20. * @returns void * */
search/sublist_search.cpp:298
Method
testCase_3
* @brief A test case with array of length 1000. * @returns void * */
sorting/random_pivot_quick_sort.cpp:278
Method
testCase_3
* @brief A test case which contains main list of 50 elements and sublist * of 20. * @returns void * */
operations_on_datastructures/inorder_successor_of_bst.cpp:345
Function
testConstructedQueueIsEmpty
data_structures/test_queue.cpp:7
Function
testConstructedStackIsEmpty
data_structures/test_stack.cpp:9
Function
testFront
data_structures/test_queue.cpp:39
Function
testTop
data_structures/test_stack.cpp:25
Function
timer_cb
* @brief GLUT timer callback function to add animation delay. */
graphics/spirograph.cpp:225
Method
toVector
* @brief converts the queue into the std::vector * @return std::vector containning all of the elements of the queue in the * same order
data_structures/queue.hpp:29
Function
travelling_salesman_using_bit_manipulation
* @brief The function implements travellingSalesman using bitmanipulation * @param dist is the cost to reach between two cities/nodes * @param setOf
bit_manipulation/travelling_salesman_using_bit_manipulation.cpp:53
Method
traverse_inorder
* @brief Recursive function to traverse the tree in in-order order. * * @param callback Function that is called when a value needs to proces
data_structures/binary_search_tree2.cpp:197
Method
traverse_postorder
* @brief Recursive function to traverse the tree in post-order order. * * @param callback Function that is called when a value needs to proc
data_structures/binary_search_tree2.cpp:231
Method
traverse_preorder
* @brief Recursive function to traverse the tree in pre-order order. * * @param callback Function that is called when a value needs to proce
data_structures/binary_search_tree2.cpp:214
Method
trie
data_structures/trie_tree.cpp:72
Method
uint128_t
ciphers/uint128_t.hpp:92
Method
uint256_t
Constructors
ciphers/uint256_t.hpp:66
Method
update
* @brief This function updates the value at node with val * @param node the node where the update is done * @param val the value that is bei
range_queries/heavy_light_decomposition.cpp:481
Method
update
* @brief Update the subtree size of the node * @param x The node to update */
data_structures/treap.cpp:63
Method
upper
* @brief returns upper 64-bit integer part * @returns returns upper 64-bit integer part */
ciphers/uint128_t.hpp:208
Function
user_input_test
* @brief Take user input in the test cases (optional; currently commented) * @returns void */
math/power_of_two.cpp:79
Function
wiggleSort
this allows to have vectors of ints, double, float, etc
sorting/wiggle_sort.cpp:54
Method
~BinaryTree
operations_on_datastructures/reverse_binary_tree.cpp:107
Method
~CircularLinkedList
* @brief Cleans up memory when destroyed */
operations_on_datastructures/circular_linked_list.cpp:122
Method
~DenseLayer
* Destructor for class DenseLayer. */
machine_learning/neural_network.cpp:224
Method
~Edge
graph/cycle_check_directed_graph.cpp:30
Method
~EightPuzzle
* @brief Destructor of EightPuzzle */
machine_learning/a_star_search.cpp:152
Method
~Graph
graph/cycle_check_directed_graph.cpp:58
Method
~Graph
dynamic_programming/floyd_warshall.cpp:27
Method
~Info
* @brief Destructor for Info */
machine_learning/a_star_search.cpp:364
Method
~Knn
* @brief Destroy the Knn object */
machine_learning/k_nearest_neighbors.cpp:95
Method
~LFUCache
* @brief destructs the cache, iterates on the map and deletes every node * present in the cache. */
others/lfu_cache.cpp:235
Method
~LRUCache
* @brief destructs the cache, iterates on the map and deletes every node * present in the cache. */
others/lru_cache2.cpp:205
Method
~MinHeap
data_structures/binaryheap.cpp:51
Method
~NeuralNetwork
* Destructor for class NeuralNetwork. */
machine_learning/neural_network.cpp:355
Method
~Queue
data_structures/circular_queue_using_linked_list.cpp:16
Method
~Tnode
To free up the dynamically allocated objects
operations_on_datastructures/trie_multiple_search.cpp:93
Method
~Tree234
data_structures/tree_234.cpp:541
Method
~cll
data_structures/cll/cll.cpp:13
Method
~list
data_structures/reverse_a_linked_list.cpp:196
Method
~uint128_t
* @brief Destructor for uint128_t */
ciphers/uint128_t.hpp:133
Method
~uint256_t
* @brief Destructor for uint256_t */
ciphers/uint256_t.hpp:116
← previous
2,001–2,100 of 2,100, ranked by callers