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
isEmpty
* @brief Utility function that checks if the list is empty * @returns true if the list is empty * @returns false if the list is not empty */
data_structures/reverse_a_linked_list.cpp:93
Function
isPossible
backtracking/sudoku_solver.cpp:44
Function
isSafe
backtracking/graph_coloring.cpp:61
Function
isSafe
backtracking/n_queens.cpp:58
Method
isSame
* @brief A utility function which check whether i and j belongs to * same set or not * @param i element of some set * @param j element
data_structures/dsu_path_compression.cpp:124
Method
isSame
* @brief A utility function which check whether i and j belongs to same set * or not * @param i element of some set * @param j element
data_structures/dsu_union_rank.cpp:108
Method
isValidBinaryString
* @brief Validates whether a string contains only binary characters (0 or 1). * @param str The string to validate. * @return true if the str
greedy_algorithms/binary_addition.cpp:75
Function
issafe
backtracking/knight_tour.cpp:40
Function
k
* @brief A function k(x) that will be used to test the method * @param x The independent variable xi * @returns the value of the dependent variable
numerical_methods/midpoint_integral_method.cpp:103
Function
k
@brief Another test function */
numerical_methods/composite_simpson_rule.cpp:117
Function
keyboard_cb
* @brief Keypress event call back function. * * @param key ID of the key pressed * @param x mouse pointer position at event * @param y mouse point
graphics/spirograph.cpp:237
Method
kth_ancestor
* @brief The function returns the kth ancestor of a node * @param p the node id whose kth ancestor is to be found * @param dist the distance
range_queries/heavy_light_decomposition.cpp:220
Function
l
* @brief A function l(x) that will be used to test the method * @param x The independent variable xi * @returns the value of the dependent variable
numerical_methods/midpoint_integral_method.cpp:109
Function
l
@brief Another test function*/
numerical_methods/composite_simpson_rule.cpp:119
Method
large_number
< initializer with value = 1 */
math/large_number.h:27
Method
lazy
* @brief If there is some value to be propagated to the passed node, value * is added to the node and the children of the node, if exist, are cop
range_queries/persistent_seg_tree_lazy_prop.cpp:84
Method
lca
* @brief The function returns the least common ancestor of two nodes * @param a node id_1 * @param b node id_2 * @returns the least com
range_queries/heavy_light_decomposition.cpp:231
Method
left
to get index of left child of node at index i */
data_structures/binaryheap.cpp:31
Method
leftrotate
data_structures/rb_tree.cpp:295
Method
lift
* @brief The function lifts a node, k units up the tree. * The lifting is done in place, and the result is stored in the address * pointed b
range_queries/heavy_light_decomposition.cpp:202
Method
link
* Creates link with provided value and pointer to next link * @param value is the integer stored in the link */
data_structures/linked_list.cpp:75
Method
list
* List constructor. Initializes the first and last link. */
data_structures/linked_list.cpp:89
Method
list
data_structures/reverse_a_linked_list.cpp:83
Method
list
* @brief copy constructor creating a deep copy of every node of the input */
data_structures/reverse_a_linked_list.cpp:206
Method
load_model
* Function to load earlier saved model. * @param file_name file from which model will be loaded (*.model) * @return instance of NeuralNetwor
machine_learning/neural_network.cpp:732
Method
log
search/sublist_search.cpp:176
Method
log
sorting/random_pivot_quick_sort.cpp:189
Method
log
operations_on_datastructures/inorder_successor_of_bst.cpp:233
Function
main
Main function */
machine_learning/adaline_learning.cpp:357
Function
main
* @brief Main function * @return int 0 on exit */
machine_learning/k_nearest_neighbors.cpp:191
Function
main
* main function */
machine_learning/ordinary_least_squares_regressor.cpp:421
Function
main
Main function */
machine_learning/kohonen_som_topology.cpp:582
Function
main
* @brief Main function * @returns 0 on exit */
machine_learning/neural_network.cpp:833
Function
main
Main function */
machine_learning/kohonen_som_trace.cpp:457
Function
main
* @brief Main function * @returns 0 on exit */
machine_learning/a_star_search.cpp:709
Function
main
Main function */
strings/rabin_karp.cpp:105
Function
main
* @brief main function * @returns 0 on exit */
strings/duval.cpp:115
Function
main
* @brief Main function * @returns 0 on exit */
strings/boyer_moore.cpp:269
Function
main
* @brief Main Function that calls test function * @returns 0 on exit */
strings/horspool.cpp:119
Function
main
Main function */
strings/brute_force_string_searching.cpp:47
Function
main
* @brief Main function * @returns 0 on exit */
strings/z_function.cpp:110
Function
main
* @brief Main function * @returns 0 on exit */
strings/knuth_morris_pratt.cpp:95
Function
main
* @brief Main function * @returns 0 on exit */
strings/manacher_algorithm.cpp:172
Function
main
* @brief Main function * @returns 0 on exit */
games/memory_game.cpp:360
Function
main
greedy_algorithms/prims_minimum_spanning_tree.cpp:59
Function
main
greedy_algorithms/kruskals_minimum_spanning_tree.cpp:184
Function
main
* @brief Main function * @returns 0 on exit */
greedy_algorithms/dijkstra_greedy.cpp:199
Function
main
greedy_algorithms/knapsack.cpp:40
Function
main
Driver program to test above functions
greedy_algorithms/huffman.cpp:99
Function
main
* @brief main function * @returns 0 on successful exit */
greedy_algorithms/binary_addition.cpp:116
Function
main
* @brief Main function * @returns 0 on exit */
greedy_algorithms/jump_game.cpp:71
Function
main
* @brief main function * @return 0 on successful exit */
greedy_algorithms/digit_separation.cpp:138
Function
main
* @brief Main function * @returns 0 on exit */
greedy_algorithms/boruvkas_minimum_spanning_tree.cpp:224
Function
main
* @brief Main function * @returns 0 on exit */
greedy_algorithms/gale_shapley.cpp:152
Function
main
Main function */
others/fast_integer_input.cpp:39
Function
main
others/paranthesis_matching.cpp:50
Function
main
* @brief Main function * @returns 0 on exit */
others/kadanes3.cpp:60
Function
main
Main function */
others/vector_important_functions.cpp:11
Function
main
Main function */
others/matrix_exponentiation.cpp:126
Function
main
* @brief Main function * @returns 0 on exit */
others/kelvin_to_celsius.cpp:78
Function
main
Main program */
others/smallest_circle.cpp:198
Function
main
main function */
others/spiral_print.cpp:69
Function
main
main function */
others/sparse_matrix.cpp:9
Function
main
main function */
others/stairs_pattern.cpp:17
Function
main
main function */
others/decimal_to_roman_numeral.cpp:90
Function
main
* @brief Main function * @returns 0 on exit */
others/iterative_tree_traversals.cpp:372
Function
main
others/decimal_to_binary.cpp:46
Function
main
* @brief Main function * @returns 0 on exit */
others/postfix_evaluation.cpp:202
Function
main
* @brief Main function * @returns 0 on exit */
others/easter.cpp:107
Function
main
main function */
others/buzz_number.cpp:9
Function
main
* @brief main function * @return 0 on exit */
others/lru_cache2.cpp:274
Function
main
* @brief Main function. * @return 0 on successful execution. */
others/longest_substring_without_repeating_characters.cpp:107
Function
main
main function */
others/primality_test.cpp:31
Function
main
* @brief Main function * @returns 0 on exit */
others/recursive_tree_traversal.cpp:398
Function
main
Main function */
others/tower_of_hanoi.cpp:65
Function
main
* @brief Main function * @returns 0 on exit */
others/lru_cache.cpp:252
Function
main
* Main program */
others/decimal_to_hexadecimal.cpp:11
Function
main
* main function */
others/pascal_triangle.cpp:52
Function
main
Main function */
others/happy_number.cpp:29
Function
main
Main function */
others/palindrome_of_number.cpp:19
Function
main
* @brief main function * @return 0 on exit */
others/lfu_cache.cpp:301
Function
main
Driver Code */
geometry/jarvis_algorithm.cpp:176
Function
main
* This is the main function to test whether the algorithm is * working well. */
geometry/line_segment_intersection.cpp:92
Function
main
* @brief Main function * @returns 0 on exit *******************************************************************************/
geometry/graham_scan_algorithm.cpp:73
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/travelling_salesman_using_bit_manipulation.cpp:139
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/gray_code.cpp:110
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/set_kth_bit.cpp:77
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/hamming_distance.cpp:100
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/count_of_set_bits.cpp:88
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp:96
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/power_of_2.cpp:72
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/check_even_odd.cpp:90
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/count_bits_flip.cpp:86
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/find_non_repeating_number.cpp:85
Function
main
* @brief Main function * @returns 0 on exit */
bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp:98
Function
main
* @brief Main function * @returns 0 on exit */
search/text_search.cpp:44
Function
main
Driver program to test function
search/jump_search.cpp:44
Function
main
* Main function */
search/median_search.cpp:128
Function
main
* @brief Main function * @returns 0 on exit *******************************************************************************/
search/binary_search.cpp:144
Function
main
main function */
search/interpolation_search2.cpp:32
← previous
next →
1,501–1,600 of 2,100, ranked by callers