Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/C
/ functions
Functions
1,322 in github.com/TheAlgorithms/C
⨍
Functions
1,322
◇
Types & classes
204
↓ 38 callers
Function
max
leetcode/src/110.c:1
↓ 29 callers
Function
printMessage
* @brief Function printMessage * Responsible for printing the auxiliary message * @param msg msg with board */
games/naval_battle.c:266
↓ 26 callers
Function
insertEdge
data_structures/graphs/graph.c:41
↓ 25 callers
Function
min
Fucntion to calculate min of values a and b
leetcode/src/11.c:2
↓ 21 callers
Function
create_polynomial
* The function will create a polynomial * @param poly stores the address of the polynomial being created * @param coef contains the coefficient of t
misc/poly_add.c:48
↓ 15 callers
Function
len
* This function returns the length the Vector. * @params Vector* (a pointer to the Vector struct) * @returns: int */
data_structures/vector.c:56
↓ 14 callers
Function
nodeHeight
data_structures/binary_trees/avl_tree.c:32
↓ 13 callers
Function
print
sorting/bucket_sort.c:164
↓ 12 callers
Function
add
data_structures/hash_set/hash_set.c:17
↓ 12 callers
Function
fib
* @param n index of number in Fibonacci sequence * @returns nth value of fibonacci sequence for all n >= 0 */
math/fibonacci_formula.c:17
↓ 12 callers
Function
testHelper
* @brief Testing helper function * @param regex the regular expression to be used * @param string the string to match against * @param expected exp
misc/mcnaughton_yamada_thompson.c:540
↓ 11 callers
Function
_random
* \brief Helper function to generate a random number in a given interval. * \details * \n Steps: * 1. `r1 = rand() % 100` gets a random number betw
machine_learning/kohonen_som_trace.c:54
↓ 11 callers
Function
_random
* Helper function to generate a random number in a given interval. * \n Steps: * 1. `r1 = rand() % 100` gets a random number between 0 and 99 * 2.
machine_learning/kohonen_som_topology.c:87
↓ 11 callers
Function
addRule
* @brief adds a transition rule to a NFA * @param nfa target NFA * @param rule the rule to be added * @param loc which state this rule should be ad
misc/mcnaughton_yamada_thompson.c:380
↓ 11 callers
Function
createRule
* @brief creates and initializes a transition rule * @param state transition target * @param c transition condition * @returns pointer to the newly
misc/mcnaughton_yamada_thompson.c:637
↓ 11 callers
Function
displayCArray
data_structures/array/carray.c:146
↓ 10 callers
Function
convert_to_decimal
* @brief Converts the given binary number * to its equivalent decimal number/value. * @param number The binary number to be converted * @returns Th
conversions/binary_to_decimal.c:29
↓ 10 callers
Function
print_matrix
* function to display matrix on stdout */
numerical_methods/qr_decompose.h:22
↓ 9 callers
Function
display_polynomial
* The function will display the polynomial * @param poly first term of the polynomial to be displayed * @returns none */
misc/poly_add.c:164
↓ 9 callers
Function
free_poly
* @brief Frees memory space * @param poly first term of polynomial * @returns void */
misc/poly_add.c:31
↓ 9 callers
Function
put_char
* @brief Prints one character on screen * @param s character to be printed on the screen */
developer_tools/min_printf.h:114
↓ 9 callers
Function
save_nd_data
* Save a given n-dimensional data martix to file. * * \param [in] fname filename to save in (gets overwriten without confirmation) * \param [in] X
machine_learning/kohonen_som_trace.c:70
↓ 8 callers
Function
G
* @brief blake2b mixing function G * * Shuffles values in block v depending on * provided indeces a, b, c, and d. x and y * are also mixed into th
hash/hash_blake2b.c:175
↓ 8 callers
Function
contains
data_structures/hash_set/hash_set.c:43
↓ 8 callers
Function
exponential_search
* Function: exponential_search * \brief algorithm that search the index of the given item * \details recursive function that take an array and quick
searching/exponential_search.c:29
↓ 8 callers
Function
printsTray
* @brief Function printsTray * Responsible for printing the visual board for the user * @param mat Matrix * @param stage game step */
games/naval_battle.c:355
↓ 8 callers
Function
push
* Push data onto the stack. */
data_structures/stack.c:82
↓ 7 callers
Function
adaline_get_weights_str
* Operator to print the weights of the model * @param ada model for which the values to print * @returns pointer to a NULL terminated string of form
machine_learning/adaline_learning.c:112
↓ 7 callers
Function
c_atoi
* the function take a string and return an integer * \param[out] str pointer to a char address */
conversions/c_atoi_str_to_integer.c:16
↓ 7 callers
Function
kohonen_data_3d
Function that returns the pointer to (x, y, z) ^th location in the * linear 3D array given by: * \f[ * X_{i,j,k} = i\times M\times N + j\times N +
machine_learning/kohonen_som_topology.c:67
↓ 7 callers
Function
stack_size
* @brief Used to get the size of the Stack or the number of elements present in * the Stack. * * @param ptr Stack pointer * @return int size of st
data_structures/stack/dynamic_stack.c:193
↓ 7 callers
Function
test_string
* @brief Tests a given string * * @param s string to be tested * @param a value of key.a * @param b value of key.b * * @returns void */
cipher/affine.c:157
↓ 6 callers
Function
decimal_to_anybase
* @brief decimal_to_anybase ensure the validity of the parameters and convert any unsigned integers into any ascii positive base * @param nb to conve
conversions/decimal_to_any_base.c:73
↓ 6 callers
Function
heightDiff
data_structures/binary_trees/avl_tree.c:40
↓ 6 callers
Function
insert
* @brief To insert a new process in the queue * @param root pointer to the head of the queue * @param id process ID * @param at arrival time * @pa
process_scheduling_algorithms/non_preemptive_priority_scheduling.c:48
↓ 6 callers
Function
insertValueCArray
data_structures/array/carray.c:49
↓ 6 callers
Function
isLiteral
* @brief helper function to determine whether a character should be * considered a character literal * @param ch the character to be tested
misc/mcnaughton_yamada_thompson.c:99
↓ 6 callers
Function
max
data_structures/binary_trees/avl_tree.c:13
↓ 6 callers
Function
max
searching/pattern_search/boyer_moore_search.c:6
↓ 6 callers
Function
pop
* Pop data from the stack */
data_structures/stack.c:106
↓ 6 callers
Function
positionBoat
* @brief Function positionBoat * Responsible for placing the boats on the board, according to the size. * @param mat board * @param boat boat */
games/naval_battle.c:124
↓ 6 callers
Function
printAVL
data_structures/binary_trees/avl_tree.c:58
↓ 6 callers
Function
printPositioning
* @brief Function printPositioning * Responsible for printing messages for positioning boats on the board; of * player 1 and 2 * @param Player numb
games/naval_battle.c:652
↓ 6 callers
Function
push
data_structures/heap/min_heap.c:106
↓ 6 callers
Function
push
data_structures/heap/max_heap.c:107
↓ 6 callers
Function
retrieve_index_from_hash
data_structures/hash_set/hash_set.c:79
↓ 6 callers
Function
save_u_matrix
* Create the distance matrix or * [U-matrix](https://en.wikipedia.org/wiki/U-matrix) from the trained weights * and save to disk. * * \param [in]
machine_learning/kohonen_som_topology.c:139
↓ 6 callers
Function
subString
* @brief utility function to create a subString * @param str target string * @param begin starting index, inclusive * @param end ending index, incl
misc/mcnaughton_yamada_thompson.c:177
↓ 6 callers
Function
swap
sorting/shell_sort.c:21
↓ 6 callers
Function
symbol
* @brief Convert roman numeral symbol to a decimal value helper function * @param symbol Roman numeral char * @returns Integer of decimal value for
conversions/roman_numerals_to_decimal.c:18
↓ 6 callers
Function
validV
check if vertex is valid in a graph
data_structures/graphs/graph.c:39
↓ 5 callers
Function
adaline_predict
* predict the output of the model for given set of features * * \param[in] ada adaline model to predict * \param[in] x input vector * \param[out]
machine_learning/adaline_learning.c:136
↓ 5 callers
Function
binarySearch
This function does Binary search for `x` in `i`-th row from `j_low` to * `j_high`. * @param mat 2D matrix to search within * @param i row to search
searching/modified_binary_search.c:18
↓ 5 callers
Function
display_graph
* @brief Function to graph (x,y) points on the OpenGL graphics window. * * @param x array containing absicca of points (must be pre-allocated) * @p
graphics/spirograph.c:136
↓ 5 callers
Function
f
numerical_methods/simpsons_1_3rd_rule.c:4
↓ 5 callers
Function
getCArray
data_structures/array/carray.c:36
↓ 5 callers
Function
getsize
* @brief The function that will return current size of list * * @param head start pointer of list * @return int size of list */
data_structures/linked_list/circular_doubly_linked_list.c:169
↓ 5 callers
Function
single_test
* @brief perform one single check on the result of the algorithm with provided * parameters and expected output * * @param a first paramater for Eu
math/euclidean_algorithm_extended.c:121
↓ 5 callers
Function
testZigZag
* @brief Self-test implementations * @returns void */
leetcode/src/6.c:86
↓ 5 callers
Function
vector_norm
* Compute the norm a vector. * @f[\lVert\vec{a}\rVert = \sqrt{\vec{a}\cdot\vec{a}} @f] * @param[in] a input vector * @returns norm of the given vec
geometry/vectors_3d.c:138
↓ 4 callers
Function
Stack_push
Push an element into the stack */
data_structures/stack/stack_linked_list/stack.c:46
↓ 4 callers
Function
adjacent
data_structures/graphs/graph.c:65
↓ 4 callers
Function
adler32
* @brief 32-bit Adler algorithm implementation * * @param s NULL terminated ASCII string to hash * @return 32-bit hash result */
hash/hash_adler32.c:18
↓ 4 callers
Function
assert_bytes
* @brief Self-test implementations * @returns void */
hash/hash_blake2b.c:432
↓ 4 callers
Function
blake2b
* @brief blake2b hash function * * This is the front-end function that sets up the argument for BLAKE2B(). * * @param message the message to be ha
hash/hash_blake2b.c:354
↓ 4 callers
Function
check_placex
games/tic_tac_toe.c:223
↓ 4 callers
Function
complex_str
* create a textual form of complex number * \param[in] x point at which to evaluate the polynomial * \returns pointer to converted string */
numerical_methods/durand_kerner_roots.c:66
↓ 4 callers
Function
crc32
* @brief 32-bit CRC algorithm implementation * * @param s NULL terminated ASCII string to hash * @return 32-bit hash result */
hash/hash_crc32.c:20
↓ 4 callers
Function
create_node
* @brief Create a list node * @param data the data that the node initialises with * @return ListNode* pointer to the new
data_structures/linked_list/circular_doubly_linked_list.c:39
↓ 4 callers
Function
degree
Return the number of vertices that v is connected to
data_structures/graphs/euler.c:7
↓ 4 callers
Function
delete
* @brief Deletion by position into the list function * @param list a doubly linked List * @param pos a position into the list for value
data_structures/linked_list/doubly_linked_list.c:179
↓ 4 callers
Function
display_list
data_structures/linked_list/circular_doubly_linked_list.c:191
↓ 4 callers
Function
djb2
* @brief DJB2 algorithm implementation * * @param s NULL terminated string to hash * @return 64-bit hash result */
hash/hash_djb2.c:18
↓ 4 callers
Function
fib
* @brief Determines the nth Fibonacci term * @param number - n in "nth term" and it can't be negative as well as zero * @return nth term in unsigned
math/fibonacci.c:26
↓ 4 callers
Function
find
* @brief Find index of or value in an array * * @param [in,out] p array to search and update * @param x value to search * @return value at the ind
misc/union_find.c:17
↓ 4 callers
Function
find
A utility function to find set of an element i (uses path compression technique)
data_structures/graphs/kruskal.c:48
↓ 4 callers
Function
find
* Note: The returned array must be malloced, assume caller calls free(). */
leetcode/src/684.c:4
↓ 4 callers
Function
get
* This function get the item at the specified index of the Vector. * @params Vector* (a pointer to the Vector struct) * @params int (the index t
data_structures/vector.c:78
↓ 4 callers
Function
getEndValidIndexFromDp
leetcode/src/32.c:6
↓ 4 callers
Function
getOne
leetcode/src/12.c:1
↓ 4 callers
Function
get_max_len
(get_item)
scripts/leetcode_directory_md.py:68
↓ 4 callers
Function
hash
adler_32 hash
data_structures/hash_set/hash_set.c:62
↓ 4 callers
Function
insert
/////////////////////////////////////////////////////////////
data_structures/linked_list/singly_link_list_deletion.c:23
↓ 4 callers
Function
insert
* @brief Insertion by position into the list function * @param list a doubly linked List * @param value a value to be inserted into the l
data_structures/linked_list/doubly_linked_list.c:108
↓ 4 callers
Function
isPalindrome
* Check given number whether is palindrome number or not * @param number number to check * @return `true` if given number is palindrome number * @r
math/palindrome.c:29
↓ 4 callers
Function
isprime
Check if the given number is prime */
project_euler/problem_3/sol1.c:15
↓ 4 callers
Function
leftRotate
data_structures/binary_trees/avl_tree.c:88
↓ 4 callers
Function
leftRotate
Left Rotate
data_structures/binary_trees/red_black_tree.c:36
↓ 4 callers
Function
newGraph
data_structures/graphs/graph.c:15
↓ 4 callers
Function
placex
* @brief Update table by placing an `X` * * @param m location to place `X` * * @returns None */
games/tic_tac_toe.c:255
↓ 4 callers
Function
pop
* @brief Function to pop from the stack * @returns popped character */
conversions/infix_to_postfix2.c:45
↓ 4 callers
Function
rightRotate
data_structures/binary_trees/avl_tree.c:74
↓ 4 callers
Function
rightRotate
Right Rotate
data_structures/binary_trees/red_black_tree.c:64
↓ 4 callers
Function
sdbm
* @brief SDBM algorithm implementation * * @param s NULL terminated string to hash * @return 64-bit hash result */
hash/hash_sdbm.c:18
↓ 4 callers
Function
secant_method
* @brief Root-finding method for a continuous function given two points * @param x0 One of the starting secant points * @param x1 One of the startin
numerical_methods/secant_method.c:36
↓ 4 callers
Function
segment_tree_query
* Query the segment tree * This function helps in range query of segment tree * This function assumes that the given range is valid * Performs the
data_structures/binary_trees/segment_tree.c:105
↓ 4 callers
Function
sentinel_linear_search
* @brief Utility function to search for an element in the array and return the index of the element * @details * The so-called "sentinel" is to use
searching/sentinel_linear_search.c:36
↓ 4 callers
Function
set
* This function sets an item at the specified index of the Vector. * @params Vector* (a pointer to the Vector struct) * @params int (the index t
data_structures/vector.c:91
↓ 4 callers
Function
swap
data_structures/array/carray.c:183
↓ 4 callers
Function
testArray
sorting/patience_sort.c:120
next →
1–100 of 1,322, ranked by callers