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
↓ 1 callers
Function
getDisturb
leetcode/src/979.c:15
↓ 1 callers
Function
getEndValidIndex
leetcode/src/32.c:18
↓ 1 callers
Function
getInput
* @brief Get the input from the user * @return valid argument to the fibonacci function */
math/fibonacci.c:50
↓ 1 callers
Function
getMax
Utilitary procedure to find the greatest key in the left subtree * @param root pointer to parent node * @returns pointer to parent node */
data_structures/binary_trees/binary_search_tree.c:72
↓ 1 callers
Function
getPointerToWord
* @brief Stores word in memory * @param word word to be stored in memory * @returns a pointer to the newly allocated word if the word IS stored succ
data_structures/binary_trees/words_alphabetical.c:70
↓ 1 callers
Function
getPrecedence
* @brief getPrecedence function returns the precedence after comparing two operators passed as parameter. * @param op1 : first operator * @param op2
conversions/infix_to_postfix.c:201
↓ 1 callers
Function
getThousand
leetcode/src/12.c:118
↓ 1 callers
Function
get_angle
geometry/vectors_3d.c:202
↓ 1 callers
Function
get_ch
* @brief Returns specific required next character * @param p pointer to a format string of `min_printf()` * @param buffer struct for checking if buf
developer_tools/min_printf.h:74
↓ 1 callers
Function
get_divisors
* Get all integer divisors of a number * \param[in] N number to find divisors for * \param[out] D array to store divisors in * \returns number of d
project_euler/problem_401/sol1.c:47
↓ 1 callers
Function
get_element_index
data_structures/dictionary/dict.c:89
↓ 1 callers
Function
get_min_2d
* Get minimum value and index of the value in a matrix * \param[in] X matrix to search * \param[in] N number of points in the vector * \param[out]
machine_learning/kohonen_som_topology.c:204
↓ 1 callers
Function
get_month_days
* Function to get the number of days in a month. * \param month month identified by an integer -\n * > 0 = Jan and 11 = December * \returns numb
project_euler/problem_19/sol1.c:15
↓ 1 callers
Function
get_next_unknown
* @brief Find and get the location for next empty cell. * * @param [in] a pointer to sudoku instance * @param [out] x pointer to row index of next
misc/sudoku_solver.c:144
↓ 1 callers
Function
get_number_of_digits
* @brief Calculates the number of digits in a number * @param n number whose digits are to be counted * @return number of digits in n */
developer_tools/min_printf.h:100
↓ 1 callers
Function
get_perfect_number
* \returns -1 if N is deficient * \returns 1 if N is abundant * \returns 0 if N is perfect */
project_euler/problem_23/sol2.c:31
↓ 1 callers
Function
get_perfect_number
* Returns: * -1 if N is deficient * 1 if N is abundant * 0 if N is perfect */
project_euler/problem_23/sol1.c:19
↓ 1 callers
Function
get_product
Compute the product of two numbers in a file * * \param[in] fp pointer to file that is already open * \param[in] start_pos line number of the first
project_euler/problem_8/sol1.c:16
↓ 1 callers
Function
get_width_and_precision
* @brief Takes width and precision specified from the format of the string * @param p pointer of the format string * @param width variable in which wi
developer_tools/min_printf.h:275
↓ 1 callers
Function
grow
grow: increases the stack by 10 elements. This utility function isn't part of the public interface */
data_structures/stack/stack.c:44
↓ 1 callers
Function
hamiltonR
data_structures/graphs/hamiltonian.c:9
↓ 1 callers
Function
hanoi
Function for Tower of Hanoi algorithm
misc/tower_of_hanoi.c:6
↓ 1 callers
Function
hasEulerPath
If start from vertex v, decide if the graph has euler path
data_structures/graphs/euler.c:19
↓ 1 callers
Function
hasHamiltonianPath
data_structures/graphs/hamiltonian.c:38
↓ 1 callers
Function
haveLoadedFunctionsForFork
--------------------------------------------------------------------------*/
client_server/fork.h:166
↓ 1 callers
Function
heapSort
* @brief Heap Sort algorithm * @param arr array to be sorted * @param size size of the array * @returns void */
sorting/heap_sort_2.c:97
↓ 1 callers
Function
heapifyDown
* @brief heapifyDown Adjusts new root to the correct position in the heap * This heapify procedure can be thought of as building a heap from * the t
sorting/heap_sort_2.c:48
↓ 1 callers
Function
heapifyUp
* @brief heapifyUp Adjusts arr[i] to the correct position in the heap * This heapify procedure can be thought of as building a heap from * the botto
sorting/heap_sort_2.c:82
↓ 1 callers
Function
heapsort
sorting/heap_sort.c:30
↓ 1 callers
Function
height
Utilitary procedure to measure the height of the binary tree * @param root pointer to parent node * @param data value to store int he new node * @r
data_structures/binary_trees/binary_search_tree.c:187
↓ 1 callers
Function
hex_to_oct
* @brief Convert a hexadecimal number to octal number. * @param hex Hexadecimal number to convert. * @returns A pointer to the converted octal strin
conversions/hexadecimal_to_octal2.c:24
↓ 1 callers
Function
inList
* @brief inList function is used to know if an element is already in the memoryInfo list. * @details This function is used to know if an allocation
developer_tools/malloc_dbg.c:79
↓ 1 callers
Function
inOrder
Traversal procedure to list the current keys in the tree in order of value * (from the left to the right) * @param root pointer to parent node */
data_structures/binary_trees/binary_search_tree.c:238
↓ 1 callers
Function
in_word
* @brief checks if letter is in current word * @param letter letter guessed by player * @param word current word * @param size length of word * @r
games/hangman.c:119
↓ 1 callers
Function
init_dynamic_array
data_structures/dynamic_array/dynamic_array.c:6
↓ 1 callers
Function
init_hash_set
data_structures/hash_set/hash_set.c:6
↓ 1 callers
Function
inorder_display
* performs inorder traversal * param[in] curr node pointer to the topmost node of the tree */
data_structures/binary_trees/threaded_binary_trees.c:129
↓ 1 callers
Function
insert
data_structures/linked_list/ascending_priority_queue.c:49
↓ 1 callers
Function
insert
data_structures/linked_list/queue_linked_list.c:37
↓ 1 callers
Function
insert
Insertion procedure, which inserts the input key in a new node in the tree * @param root pointer to parent node * @param data value to store int he
data_structures/binary_trees/binary_search_tree.c:46
↓ 1 callers
Function
insert
data_structures/binary_trees/avl_tree.c:116
↓ 1 callers
Function
insertNode
To insert a node in the existing tree
data_structures/binary_trees/red_black_tree.c:284
↓ 1 callers
Function
insert_at_head
* @brief Insert a node at start of list * @param head start pointer of list * @param data the data that the node i
data_structures/linked_list/circular_doubly_linked_list.c:55
↓ 1 callers
Function
insert_at_tail
* @brief Insert a node at end of list * * @param head start pointer of list * @param data the data that the node
data_structures/linked_list/circular_doubly_linked_list.c:84
↓ 1 callers
Function
insert_bt
* inserts a node into the tree * param[in,out] root pointer to node pointer to the topmost node of the tree * param[in] data value to be inserted in
data_structures/binary_trees/threaded_binary_trees.c:51
↓ 1 callers
Function
insertionSort
This is where the sorting of the array takes place arr[] --- Array to be sorted size --- Array Size */
sorting/binary_insertion_sort.c:34
↓ 1 callers
Function
insertionSort
* Insertion sort algorithm implements * @param arr array to be sorted * @param size size of array */
sorting/insertion_sort.c:16
↓ 1 callers
Function
inssort
sorting/multikey_quick_sort.c:121
↓ 1 callers
Function
int_fact
math/prime_factoriziation.c:60
↓ 1 callers
Function
interchange
numerical_methods/gauss_elimination.c:19
↓ 1 callers
Function
interpolationSearch
searching/interpolation_search.c:17
↓ 1 callers
Function
inverse_key
* @brief Given a valid affine cipher key, this function will produce the * inverse key. * * @param key They key to be inverted * * @returns inver
cipher/affine.c:87
↓ 1 callers
Function
isAccepting
* @brief determines whether the NFA is currently in its accepting state * @param nfa target NFA * @returns `1` if the NFA is in its accepting state
misc/mcnaughton_yamada_thompson.c:522
↓ 1 callers
Function
isAllUpper
Another way */
leetcode/src/520.c:24
↓ 1 callers
Function
isBalanced
data_structures/stack/parenthesis.c:50
↓ 1 callers
Function
isEmpty
isEmpty(): returns 1 if stack is empty otherwise 0. */
data_structures/stack/stack.c:117
↓ 1 callers
Function
isMatch
leetcode/src/10.c:47
↓ 1 callers
Function
isOprnd
* @brief isOprnd function * @param ch : this is the element from the infix array * @returns 1 or 0 on exit */
conversions/infix_to_postfix.c:93
↓ 1 callers
Function
isVowel
leetcode/src/1704.c:1
↓ 1 callers
Function
isWordLess
leetcode/src/953.c:3
↓ 1 callers
Function
is_leap_year
* @brief Check if input year is a leap year. * \param year year to check * \return 1 if input year is a leap year * \return 0 if input year is n
project_euler/problem_19/sol1.c:41
↓ 1 callers
Function
is_palindromic
Check if number is palindromic * \param[in] n number to check * \returns 1 if palindromic * \returns 0 if not palindromic */
project_euler/problem_4/sol.c:12
↓ 1 callers
Function
is_prime
Function to check if a number is prime */
project_euler/problem_10/sol1.c:11
↓ 1 callers
Function
is_sum_of_abundant
* check if a given number can be represented as a sum * of two abundant numbers. * \returns 1 - if yes * \returns 0 - if not */
project_euler/problem_23/sol2.c:87
↓ 1 callers
Function
is_sum_of_abundant
* check if a given number can be represented as a sum * of two abundant numbers. * \returns 1 - if yes * \returns 0 - if not */
project_euler/problem_23/sol1.c:71
↓ 1 callers
Function
isbad_alphabet
* @brief Checking if alphabet is valid * @param base alphabet inputed by user * @return int64_t as success or not */
conversions/decimal_to_any_base.c:20
↓ 1 callers
Function
isleaf
leetcode/src/404.c:1
↓ 1 callers
Function
kohonen_get_min_1d
* Get minimum value and index of the value in a vector * \param[in] X vector to search * \param[in] N number of points in the vector * \param[out]
machine_learning/kohonen_som_trace.c:104
↓ 1 callers
Function
kohonen_update_weights
* Update weights of the SOM using Kohonen algorithm * * \param[in] x data point * \param[in,out] W weights matrix * \param[in,out] D temporary vec
machine_learning/kohonen_som_trace.c:129
↓ 1 callers
Function
kohonen_update_weights
* Update weights of the SOM using Kohonen algorithm * * \param[in] X data point * \param[in,out] W weights matrix * \param[in,out] D temporary vec
machine_learning/kohonen_som_topology.c:234
↓ 1 callers
Function
largest
sorting/radix_sort.c:3
↓ 1 callers
Function
lazy_sort
* Alphabetical sorting using 'lazy sort' algorithm */
project_euler/problem_22/sol1.c:48
↓ 1 callers
Function
lcm
Function to return LCM of two numbers
math/lcm.c:19
↓ 1 callers
Function
lcm
Compute [Least Common Multiple * (LCM)](https://en.wikipedia.org/wiki/Least_common_multiple) of two numbers * @param a first number * @param b seco
project_euler/problem_5/sol3.c:41
↓ 1 callers
Function
lcsbuild
* @brief Builds the LCS according to B using a traceback approach * @param s1 first null-terminated string * @param l1 length of s1 * @param l2 len
dynamic_programming/lcs.c:64
↓ 1 callers
Function
lcslen
* @brief Computes LCS between s1 and s2 using a dynamic-programming approach * @param s1 first null-terminated string * @param s2 second null-termin
dynamic_programming/lcs.c:30
↓ 1 callers
Function
lerp
math/lerp.c:4
↓ 1 callers
Function
linearsearch
searching/linear_search.c:4
↓ 1 callers
Function
longestDecompositionDp
leetcode/src/1147.c:25
↓ 1 callers
Function
longestSquareStreakDp
leetcode/src/2501.c:3
↓ 1 callers
Function
longestSub
misc/longest_subsequence.c:4
↓ 1 callers
Function
lu_decomposition
Perform LU decomposition on matrix * \param[in] A matrix to decompose * \param[out] L output L matrix * \param[out] U output U matrix * \param[in]
numerical_methods/lu_decompose.c:20
↓ 1 callers
Function
mat_mul
* Perform multiplication of two matrices. * * R2 must be equal to C1 * * Resultant matrix size should be R1xC2 * \param[in] A first matrix to multi
numerical_methods/qr_eigen_values.c:59
↓ 1 callers
Function
matchStar
leetcode/src/10.c:38
↓ 1 callers
Function
matrixChainOrder
* @brief Finds the optimal sequence using the classic O(n^3) algorithm. * @param l length of cost array * @param p costs of each matrix * @param s
dynamic_programming/matrix_chain_order.c:26
↓ 1 callers
Function
max
leetcode/src/485.c:1
↓ 1 callers
Function
maxval
leetcode/src/104.c:10
↓ 1 callers
Function
merge
* @brief Perform merge of segments. * * @param a array to sort * @param l left index for merge * @param r right index for merge * @param n total
sorting/merge_sort.c:33
↓ 1 callers
Function
merge
data_structures/linked_list/merge_linked_lists.c:14
↓ 1 callers
Function
merge_sort
Merge sort algorithm implementation * @param a array to sort * @param n number of elements in the array * @param l index to sort from * @param r i
sorting/merge_sort.c:87
↓ 1 callers
Function
mergesort
sorting/merge_sort_nr.c:19
↓ 1 callers
Function
midpoint_euler
* @brief Compute approximation using the midpoint-Euler * method in the given limits. * @param[in] dx step size * @param[in] x0 initial va
numerical_methods/ode_midpoint_euler.c:106
↓ 1 callers
Function
midpoint_euler_step
* @brief Compute next step approximation using the midpoint-Euler * method. * @f[y_{n+1} = y_n + dx\, f\left(x_n+\frac{1}{2}dx, * y_n + \frac{1}{2}
numerical_methods/ode_midpoint_euler.c:83
↓ 1 callers
Function
minDistance
Utility function to find minimum distance vertex in mdist
data_structures/graphs/dijkstra.c:33
↓ 1 callers
Function
minNode
Returns the node with min key in the left subtree*/
data_structures/binary_trees/avl_tree.c:49
↓ 1 callers
Function
miroir
the function miroir (in french ) it means "mirror" , the major idea is to permute the first caractere with the last using an auxilary variable (aux) t
misc/mirror.c:27
↓ 1 callers
Function
modifiedBinarySearch
Function to perform binary search on the mid values of row to get the * desired pair of rows where the element can be found * @param [in] mat matrix
searching/modified_binary_search.c:48
↓ 1 callers
Function
modular_multiplicative_inverse
* @brief finds the value x such that (a * x) % m = 1 * * @param a number we are finding the inverse for * @param m the modulus the inversion is bas
cipher/affine.c:47
↓ 1 callers
Function
multiply
* multiply large number with another integer and * store the result in the same large number */
math/factorial_large_number.c:66
↓ 1 callers
Function
newNode
The node constructor, which receives the key value input and returns a node * pointer * @param data data to store in a new node * @returns new node
data_structures/binary_trees/binary_search_tree.c:28
← previous
next →
501–600 of 1,322, ranked by callers