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
newNode
data_structures/binary_trees/avl_tree.c:15
↓ 1 callers
Function
newNode
leetcode/src/617.c:1
↓ 1 callers
Function
newQueue
set up empty queue
data_structures/graphs/queue.c:21
↓ 1 callers
Function
new_game
* @brief creates a new game - generates a random word and stores in global variable current_word * @returns current_game - a new game instance contai
games/hangman.c:134
↓ 1 callers
Function
new_guess
* @brief checks if letter has been guessed before * @param new_guess letter that has been guessed by player * @param guesses array of player's previ
games/hangman.c:99
↓ 1 callers
Function
new_number
* create a new large number * \returns pointer to a large number */
math/factorial_large_number.c:24
↓ 1 callers
Function
next
* This function gets the next item from the Vector each time it's called. * @params Vector* (a pointer to the Vector struct) * @returns: int */
data_structures/vector.c:102
↓ 1 callers
Function
number_of_paths
* At every node, there are 2 possible ways to move -> down or right. * Since it is a square grid, there are in all, 2N steps with N down * and N rig
project_euler/problem_15/sol1.c:17
↓ 1 callers
Function
octalToBinary
* @brief Converet octal number to binary * @param octalnum octal value that need to convert * @returns A binary number after conversion */
conversions/octal_to_binary.c:16
↓ 1 callers
Function
octalToDecimal
* @brief Convert octal number to decimal number * @param octalValue is the octal number that needs to be converted * @returns a decimal number after
conversions/octal_to_hexadecimal.c:20
↓ 1 callers
Function
order
Function to calculate order of the number
math/armstrong_number.c:17
↓ 1 callers
Function
pancakeSort
Sorts the array using flip operations
sorting/pancake_sort.c:33
↓ 1 callers
Function
part
misc/rselect.c:11
↓ 1 callers
Function
partition
sorting/partition_sort.c:11
↓ 1 callers
Function
partition
Partition method which selects a pivot and places each element which is less than the pivot value to its left and the elements greater than the pi
sorting/quick_sort.c:31
↓ 1 callers
Function
partitionSort
sorting/partition_sort.c:38
↓ 1 callers
Function
patienceSort
* @brief Sorts the target array by dividing it into a variable number of internally sorted piles then merge the piles * @param array pointer to the a
sorting/patience_sort.c:22
↓ 1 callers
Function
peek
* Returns the next value to be popped. */
data_structures/stack.c:136
↓ 1 callers
Function
peek
function for peeping the element from top of the stack
data_structures/stack/main.c:78
↓ 1 callers
Function
picture
* @brief gradually draws duck as player gets letters incorrect * @param score how many incorrect guesses player has made * @returns void */
games/hangman.c:206
↓ 1 callers
Function
pid_step
misc/pid.c:42
↓ 1 callers
Function
pigeonholeSort
sorting/pigeonhole_sort.c:4
↓ 1 callers
Function
place
* @brief Update table by placing an `O` * * @returns None */
games/tic_tac_toe.c:281
↓ 1 callers
Function
placey
* @brief Update table by placing an `O` * * @param e1 location to place `O` * * @returns None */
games/tic_tac_toe.c:306
↓ 1 callers
Function
pollQueue
Returns element at front of queue
data_structures/graphs/bfs.c:195
↓ 1 callers
Function
poly_function
* Evaluate the value of a polynomial with given coefficients * \param[in] coeffs coefficients of the polynomial * \param[in] degree degree of polyno
numerical_methods/durand_kerner_roots.c:50
↓ 1 callers
Function
pop
data_structures/linked_list/stack_using_linked_lists.c:53
↓ 1 callers
Function
pop
Removes element from stack, or returns INT_MIN if stack empty
data_structures/graphs/strongly_connected_components.c:217
↓ 1 callers
Function
pop
Removes element from stack, or returns INT_MIN if stack empty
data_structures/graphs/topological_sort.c:164
↓ 1 callers
Function
pop
data_structures/stack/parenthesis.c:39
↓ 1 callers
Function
pop
function for poping the element out
data_structures/stack/main.c:62
↓ 1 callers
Function
postProcessing
* @brief performs postprocessing on a compiled NFA, * add circular empty character transition rules where * it's needed for the NFA to
misc/mcnaughton_yamada_thompson.c:393
↓ 1 callers
Function
postorder_display
* performs postorder traversal * param[in] curr node pointer to the topmost node of the tree */
data_structures/binary_trees/threaded_binary_trees.c:143
↓ 1 callers
Function
power
Function to calculate x raised to the power y
math/armstrong_number.c:7
↓ 1 callers
Function
power_of_ten
* @details * This function return ten to the power a(The parameter specified to it) like: * if the parameter specified is 4 i.e. -> power_of_ten(
developer_tools/min_printf.h:48
↓ 1 callers
Function
preProcessing
* @brief performs preprocessing on a regex string, * making all implicit concatenations explicit * @param input target regex string * @retur
misc/mcnaughton_yamada_thompson.c:109
↓ 1 callers
Function
preorder_display
* performs preorder traversal * param[in] curr node pointer to the topmost node of the tree */
data_structures/binary_trees/threaded_binary_trees.c:157
↓ 1 callers
Function
prime
variable upto which prime numbers are to be found out * @addtogroup misc * @{ */ * @brief Prime Sieve works in O(nlogn) time * @param p array to be
math/prime_sieve.c:21
↓ 1 callers
Function
print
* Print the matrix to stdout * @param [in] a array to print */
misc/sudoku_solver.c:126
↓ 1 callers
Function
print
Utility function to print distances
data_structures/graphs/bellman_ford.c:54
↓ 1 callers
Function
print
Utility function to print distances
data_structures/graphs/dijkstra.c:48
↓ 1 callers
Function
print
Utility function to print distances
data_structures/graphs/floyd_warshall.c:33
↓ 1 callers
Function
printInOrder
data_structures/binary_trees/avl_tree.c:256
↓ 1 callers
Function
printInorder
data_structures/binary_trees/red_black_tree.c:720
↓ 1 callers
Function
printList
A utility function to print a given linked list
data_structures/linked_list/middle_element_in_list.c:44
↓ 1 callers
Function
printMiddle
Function to get the middle of the linked list*/
data_structures/linked_list/middle_element_in_list.c:12
↓ 1 callers
Function
printPostOrder
data_structures/binary_trees/avl_tree.c:265
↓ 1 callers
Function
printPreOrder
data_structures/binary_trees/avl_tree.c:246
↓ 1 callers
Function
printSolution
* @brief Recursively prints the solution * @param l dimension of the solutions array * @param s solutions * @param i starting index * @param j end
dynamic_programming/matrix_chain_order.c:79
↓ 1 callers
Function
printTable
* @brief Function printTable * Responsible for printing the board * @param logic return of the logical matrix * @param stage game step * @returns
games/naval_battle.c:296
↓ 1 callers
Function
print_arr
math/prime_factoriziation.c:136
↓ 1 callers
Function
print_directory_md
Print tasks into the stdout
scripts/leetcode_directory_md.py:65
↓ 1 callers
Function
print_double_value
* @brief The algorithm here is also the same as the `print_int_value` function * * @details * First, the digits before decimal is printed by conver
developer_tools/min_printf.h:210
↓ 1 callers
Function
print_number
Print a large number */
project_euler/problem_25/sol1.c:62
↓ 1 callers
Function
print_string
* @details * First size of the string is calculated to check whether * width and precision are to be taken into account or not. * Then, the string is
developer_tools/min_printf.h:238
↓ 1 callers
Function
problem
* @brief Problem statement for a system with first-order differential * equations. Updates the system differential variables. * \note This function
numerical_methods/ode_forward_euler.c:55
↓ 1 callers
Function
processTraversal
leetcode/src/94.c:1
↓ 1 callers
Function
propagate
Iterative constructor of all sets in the current level. This function * dynamically allocates memory when creating new sets. These are freed by the
math/cantor_set.c:23
↓ 1 callers
Function
purge
Utilitary procedure to free all nodes in a tree * @param root pointer to parent node */
data_structures/binary_trees/binary_search_tree.c:217
↓ 1 callers
Function
push
data_structures/linked_list/stack_using_linked_lists.c:39
↓ 1 callers
Function
push
data_structures/linked_list/middle_element_in_list.c:28
↓ 1 callers
Function
push
Pushes element into stack
data_structures/graphs/strongly_connected_components.c:211
↓ 1 callers
Function
push
Pushes element into stack
data_structures/graphs/topological_sort.c:158
↓ 1 callers
Function
push
data_structures/stack/parenthesis.c:17
↓ 1 callers
Function
push
* @brief The push function pushes the element onto the stack. * * @param ptr Stack pointer * @param data Value to be pushed onto stack * @return i
data_structures/stack/dynamic_stack.c:101
↓ 1 callers
Function
push
function for pushing the element
data_structures/stack/main.c:52
↓ 1 callers
Function
pushValueCArray
data_structures/array/carray.c:78
↓ 1 callers
Function
put
data_structures/hash_set/hash_set.c:22
↓ 1 callers
Function
quat_from_euler
* Function to convert given Euler angles to a quaternion. * \f{eqnarray*}{ * q_{0} & = * &\cos\left(\frac{\phi}{2}\right)\cos\left(\frac{\theta}{2}
geometry/quaternions.c:47
↓ 1 callers
Function
queue_has_something
greedy_approach/dijkstra.c:30
↓ 1 callers
Function
quickSort
This is where the sorting of the array takes place arr[] --- Array to be sorted lower --- Starting index upper --- Ending index */
sorting/quick_sort.c:59
↓ 1 callers
Function
radixsort2
This is where the sorting of the array takes place arr[] --- Array to be sorted n --- Array Size max --- Maximum element in Array */
sorting/radix_sort_2.c:50
↓ 1 callers
Function
random_quick
sorting/random_quick_sort.c:40
↓ 1 callers
Function
readWordsInFileToTree
* @brief Reads words from file to tree * @param file file to be read from * @param root root node of tree * @returns a pointer to the root node */
data_structures/binary_trees/words_alphabetical.c:182
↓ 1 callers
Function
recursiveSolve
leetcode/src/1026.c:13
↓ 1 callers
Function
recursiveSolve
leetcode/src/124.c:12
↓ 1 callers
Function
redirect
* @brief helper function to recursively redirect transition rule targets * @param nfa target NFA * @param src the state to redirect away from * @pa
misc/mcnaughton_yamada_thompson.c:267
↓ 1 callers
Function
remove_digits
* Function to remove digits preceeding the * current digit. */
project_euler/problem_20/sol1.c:76
↓ 1 callers
Function
removes
data_structures/linked_list/ascending_priority_queue.c:72
↓ 1 callers
Function
removes
data_structures/linked_list/queue_linked_list.c:60
↓ 1 callers
Function
resize
data_structures/hash_set/hash_set.c:84
↓ 1 callers
Function
reverse
leetcode/src/234.c:9
↓ 1 callers
Function
reverse_str
* @brief Reverses a string using [two pointer algorithm](https://www.geeksforgeeks.org/program-reverse-array-using-pointers/?ref=rp) * @param p point
developer_tools/min_printf.h:128
↓ 1 callers
Function
rselect
misc/rselect.c:35
↓ 1 callers
Function
saisie
this function is used to put a string
misc/mirror.c:16
↓ 1 callers
Function
scc
Strongly connected components
data_structures/graphs/strongly_connected_components.c:128
↓ 1 callers
Function
search
* searches for the element * \param[in] root node pointer to the topmost node of the tree * \param[in] ele value searched for */
data_structures/binary_trees/threaded_binary_trees.c:98
↓ 1 callers
Function
segment_tree_build
* Builds a Segment tree * It is assumed that leaves of tree already contains data. * @param tree pointer to segment tree to be build */
data_structures/binary_trees/segment_tree.c:55
↓ 1 callers
Function
segment_tree_dispose
* Dispose Segment Tree * Frees all heap memory accquired by segment tree * @param tree pointer to segment tree */
data_structures/binary_trees/segment_tree.c:162
↓ 1 callers
Function
segment_tree_init
* Initializes Segment Tree * Accquires memory for segment tree * and fill the leaves of segment tree with data from array * @param arr the array da
data_structures/binary_trees/segment_tree.c:140
↓ 1 callers
Function
selectionSort
* Selection sort algorithm implements * @param arr array to be sorted * @param size size of array */
sorting/selection_sort.c:28
↓ 1 callers
Function
selectionSort
* @brief Selection Sort algorithm implemented using recursion * @param arr array to be sorted * @param size size of the array * @returns void */
sorting/selection_sort_recursive.c:56
↓ 1 callers
Function
selectionSortCArray
data_structures/array/carray.c:206
↓ 1 callers
Function
semi_implicit_euler
* @brief Compute approximation using the semi-implicit-Euler * method in the given limits. * @param[in] dx step size * @param[in] x0 initi
numerical_methods/ode_semi_implicit_euler.c:109
↓ 1 callers
Function
semi_implicit_euler_step
* @brief Compute next step approximation using the semi-implicit-Euler * method. * @param[in] dx step size * @param[in,out] x take @f$x_n@f$ and
numerical_methods/ode_semi_implicit_euler.c:85
↓ 1 callers
Function
shakersort
sorting/shaker_sort.c:11
↓ 1 callers
Function
shellSort
sorting/shell_sort.c:30
↓ 1 callers
Function
shell_sort
* Shell sort algorithm.\n * Optimized algorithm - takes half the time as other * @param [in,out] array array to sort * @param [in] LEN length of th
sorting/shell_sort2.c:41
↓ 1 callers
Function
shell_sort
* Alphabetical sorting using 'shell sort' algorithm */
project_euler/problem_22/sol1.c:20
↓ 1 callers
Function
show
function to show each pass
sorting/merge_sort_nr.c:63
← previous
next →
601–700 of 1,322, ranked by callers