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
↓ 4 callers
Function
top
data_structures/heap/min_heap.c:134
↓ 4 callers
Function
top
data_structures/heap/max_heap.c:135
↓ 4 callers
Function
validEntryLineColumn
* @brief Function validEntryLineColumn * Responsible for validating entries, for positioning boats * @param line matrix row * @param column matrix
games/naval_battle.c:25
↓ 4 callers
Function
vector_dot
* Compute dot product of two vectors of equal lengths * * If \f$\vec{a}=\left[a_0,a_1,a_2,...,a_L\right]\f$ and * \f$\vec{b}=\left[b_0,b_1,b_1,...,
numerical_methods/qr_decompose.h:43
↓ 4 callers
Function
xor8
* @brief 8-bit XOR algorithm implementation * * @param s NULL terminated ASCII string to hash * @return 8-bit hash result */
hash/hash_xor8.c:19
↓ 3 callers
Function
List_push
Push an element into top of the list */
data_structures/list/list.c:20
↓ 3 callers
Function
List_toArray
Convert list to array */
data_structures/list/list.c:37
↓ 3 callers
Function
Stack_print
Print all elements in the stack */
data_structures/stack/stack_linked_list/stack.c:75
↓ 3 callers
Function
adaline_fit
* Update the weights of the model using supervised learning for an array of * vectors. * * \param[in] ada adaline model to train * \param[in] X ar
machine_learning/adaline_learning.c:184
↓ 3 callers
Function
boyer_moore_search
Boyer Moore Search algorithm */
searching/pattern_search/boyer_moore_search.c:17
↓ 3 callers
Function
calculate_ct
* @brief To calculate the average completion time of all the processes * @param root pointer to the head of the queue * @returns float average compl
process_scheduling_algorithms/non_preemptive_priority_scheduling.c:215
↓ 3 callers
Function
celcius_to_fahrenheit
* @brief Convert celsius to Fahrenheit * @param celsius Temperature in degrees celsius double * @returns Double of temperature in degrees Fahrenheit
conversions/celsius_to_fahrenheit.c:17
↓ 3 callers
Function
closeFile
* @brief Closes the file after reading or writing * @param file pointer to the file to be closed * @returns void */
data_structures/binary_trees/words_alphabetical.c:90
↓ 3 callers
Function
contains
* @brief helper function to determine an element's presence in an array * @param states target array * @param len length of the target array * @par
misc/mcnaughton_yamada_thompson.c:428
↓ 3 callers
Function
contains
data_structures/dynamic_array/dynamic_array.c:66
↓ 3 callers
Function
convert
* @brief Function to convert infix expression to postfix expression * @param inf the input infix expression * @returns output postfix expression */
conversions/infix_to_postfix2.c:100
↓ 3 callers
Function
create
* @brief Create list function, a new list containing one node will be created * @param value a value to be saved into the first list node
data_structures/linked_list/doubly_linked_list.c:92
↓ 3 callers
Function
delete_adaline
delete dynamically allocated memory * \param[in] ada model from which the memory is to be freed. */
machine_learning/adaline_learning.c:89
↓ 3 callers
Function
destroyNFA
* @brief recursively destroys a NFA * @param nfa pointer to the object to be deleted * @returns void */
misc/mcnaughton_yamada_thompson.c:701
↓ 3 callers
Function
display
Function to display square matrix */
numerical_methods/lu_decompose.c:66
↓ 3 callers
Function
display
numerical_methods/gauss_elimination.c:6
↓ 3 callers
Function
dot_prod
* Obtain the dot product of two 3D vectors. * @f[ * \vec{a}\cdot\vec{b}=a_xb_x + a_yb_y + a_zb_z * @f] * @param[in] a first vector * @param[in] b
geometry/vectors_3d.c:76
↓ 3 callers
Function
eigen_values
Compute eigen values using iterative shifted QR decomposition algorithm as * follows: * 1. Use last diagonal element of A as eigen value approximati
numerical_methods/qr_eigen_values.c:106
↓ 3 callers
Function
empty
data_structures/linked_list/ascending_priority_queue.c:41
↓ 3 callers
Function
empty
data_structures/linked_list/queue_linked_list.c:29
↓ 3 callers
Function
endProgramAbruptly
* @brief Ends program due to an error * @param errorMessage the error message to be printed * @returns void */
data_structures/binary_trees/words_alphabetical.c:41
↓ 3 callers
Function
factorial
math/catalan.c:5
↓ 3 callers
Function
findNode
data_structures/binary_trees/avl_tree.c:233
↓ 3 callers
Function
fork
--------------------------------------------------------------------------*/
client_server/fork.h:218
↓ 3 callers
Function
formatted_string
(header, title, solution, difficulty)
scripts/leetcode_directory_md.py:78
↓ 3 callers
Function
func
* @brief Continuous function for which we want to find the root * @param x Real input variable * @returns The evaluation result of the function usin
numerical_methods/secant_method.c:21
↓ 3 callers
Function
func
* @brief Continuous function for which we want to find the root * @param x Real input variable * @returns The evaluation result of the function usin
numerical_methods/bisection_method.c:43
↓ 3 callers
Function
getPointKey
leetcode/src/79.c:1
↓ 3 callers
Function
getTen
leetcode/src/12.c:40
↓ 3 callers
Function
getTripletId
Returns the id of triplet which the point (i, j) belongs to
leetcode/src/37.c:11
↓ 3 callers
Function
get_clock_diff
* Convert clock cycle difference to time in seconds * * \param[in] start_t start clock * \param[in] end_t end clock * \returns time difference in
machine_learning/kohonen_som_trace.c:511
↓ 3 callers
Function
get_clock_diff
* Convert clock cycle difference to time in seconds * * \param[in] start_t start clock * \param[in] end_t end clock * \returns time difference in
machine_learning/kohonen_som_topology.c:663
↓ 3 callers
Function
increase
math/prime_factoriziation.c:151
↓ 3 callers
Function
init
* This function initilaizes the vector and gives it a size of 1 * and initializes the first index to 0. * @params Vector* (a pointer to the Vector s
data_structures/vector.c:25
↓ 3 callers
Function
initSet
leetcode/src/37.c:1
↓ 3 callers
Function
int_to_string
* Converts an integer value to a null-terminated string using the specified * base and stores the result in the array given by str parameter. * @par
conversions/int_to_string.c:25
↓ 3 callers
Function
isEmpty
* Returns 1 if stack is empty, returns 0 if not empty. */
data_structures/stack.c:155
↓ 3 callers
Function
isempty
* @brief The function is used to check whether the stack is empty or not and * return true or false accordingly. * * @param ptr Stack pointer * @r
data_structures/stack/dynamic_stack.c:177
↓ 3 callers
Function
join
* @brief Function to join * @param [in,out] p array to join in * @param x value or index to join to * @param y value or index to join from */
misc/union_find.c:42
↓ 3 callers
Function
jump_search
* @brief Implement Jump-search algorithm * * @param [in] arr Array to search within * @param x value to search for * @param n length of array * @
searching/jump_search.c:24
↓ 3 callers
Function
kohonen_som
* Apply incremental algorithm with updating neighborhood and learning rates * on all samples in the given datset. * * \param[in] X data set * \par
machine_learning/kohonen_som_topology.c:314
↓ 3 callers
Function
kohonen_som_tracer
* Apply incremental algorithm with updating neighborhood and learning rates * on all samples in the given datset. * * \param[in] X data set * \par
machine_learning/kohonen_som_trace.c:179
↓ 3 callers
Function
l_length
* @brief To length process queue * @param root pointer to the head of the queue * @returns int total length of the queue */
process_scheduling_algorithms/non_preemptive_priority_scheduling.c:129
↓ 3 callers
Function
min_printf
* min_printf is the function same as printf * @param fmt format of string * @param ... arguments passed according to the format */
developer_tools/min_printf.h:299
↓ 3 callers
Function
naive_search
Naive Pattern Search algorithm (brute force way) */
searching/pattern_search/naive_search.c:5
↓ 3 callers
Function
newNode
Create a new node
data_structures/binary_trees/red_black_tree.c:15
↓ 3 callers
Function
new_adaline
* Default constructor * \param[in] num_features number of features present * \param[in] eta learning rate (optional, default=0.1) * \returns new ad
machine_learning/adaline_learning.c:59
↓ 3 callers
Function
octalToHexadecimal
* @brief Convert octal number to hexadecimal number * dynamically allocated memory needs to be freed by the calling the function free * @param octal
conversions/octal_to_hexadecimal.c:38
↓ 3 callers
Function
peek
* @brief To retrieve or fetch the first element of the Stack or the element * present at the top of the Stack. * * @param ptr Stack pointer * @ret
data_structures/stack/dynamic_stack.c:152
↓ 3 callers
Function
poly_add
misc/poly_add.c:73
↓ 3 callers
Function
pop
* @brief Function to pop from the stack * @returns popped number */
misc/postfix_evaluation.c:44
↓ 3 callers
Function
pop
* @brief pop function * @param *p : used as a pointer variable of stack * @returns x or \0 on exit */
conversions/infix_to_postfix.c:72
↓ 3 callers
Function
powPositive
leetcode/src/50.c:1
↓ 3 callers
Function
printMessageScore
* @brief Function printMessageScore * Responsible for printing the score messages * @param pts1 player 1 score * @param pts2 player 2 score */
games/naval_battle.c:280
↓ 3 callers
Function
print_int_value
* @details * The algorithm here is to first convert the number into * string and then reverse it be passing it to reverse_str function * and then
developer_tools/min_printf.h:158
↓ 3 callers
Function
print_list
data_structures/list/main.c:7
↓ 3 callers
Function
printlist
data_structures/linked_list/merge_linked_lists.c:46
↓ 3 callers
Function
rabin_karp_search
Kabin-Karp algorithm for pattern searching d: radix-d notation. Ex. number from 0->9, d = 10 q: prime number for hashing */
searching/pattern_search/rabin_karp_search.c:7
↓ 3 callers
Function
roman_to_decimal
* @brief Converts roman numerals into a decimal number * @param input Input roman numeral as a C-string * @returns The converted number in decimal f
conversions/roman_numerals_to_decimal.c:51
↓ 3 callers
Function
rot13
* @brief Apply the ROT13 cipher * @param s contains the string to be processed */
cipher/rot13.c:23
↓ 3 callers
Function
run_length_encode
misc/run_length_encoding.c:27
↓ 3 callers
Function
save_2d_data
* Save a given n-dimensional data martix to file. * * \param[in] fname filename to save in (gets overwritten without confirmation) * \param[in] X m
machine_learning/kohonen_som_topology.c:102
↓ 3 callers
Function
size
* Returns the size of the stack. */
data_structures/stack.c:150
↓ 3 callers
Function
swap
* @brief Swapped two numbers using pointer * @param first pointer of first number * @param second pointer of second number */
sorting/heap_sort_2.c:32
↓ 3 callers
Function
swap
sorting/random_quick_sort.c:33
↓ 3 callers
Function
transit
* @brief moves a NFA forward * @param nfa target NFA * @param input the character to be fed into the NFA * @returns void */
misc/mcnaughton_yamada_thompson.c:465
↓ 2 callers
Function
F
* @brief compression function F * * Securely mixes the values in block m into * the state vector h. Value at v[14] is also * inverted if this is t
hash/hash_blake2b.c:203
↓ 2 callers
Function
LeftRightRotate
data_structures/binary_trees/avl_tree.c:102
↓ 2 callers
Function
List_init
Initial list */
data_structures/list/list.c:11
↓ 2 callers
Function
MAX
Utility function to get the maximum value in ar[]
sorting/radix_sort_2.c:8
↓ 2 callers
Function
QueueEnqueue
insert an int at end of queue
data_structures/graphs/queue.c:47
↓ 2 callers
Function
RightLeftRotate
data_structures/binary_trees/avl_tree.c:109
↓ 2 callers
Function
Stack_pop
Pop an element out of the stack */
data_structures/stack/stack_linked_list/stack.c:59
↓ 2 callers
Function
Stack_size
Return size of the stack */
data_structures/stack/stack_linked_list/stack.c:39
↓ 2 callers
Function
Top
* @brief Function to get top of the stack * @returns top of stack */
conversions/infix_to_postfix2.c:72
↓ 2 callers
Function
add
data_structures/dynamic_array/dynamic_array.c:15
↓ 2 callers
Function
addEdge
Creates a unidirectional graph
data_structures/graphs/strongly_connected_components.c:180
↓ 2 callers
Function
addMemInfo
* @brief addMemInfo function add a memory allocation in the memoryInfo list. * @details This function creates a new element and add it on top of the
developer_tools/malloc_dbg.c:51
↓ 2 callers
Function
addState
* @brief adds a state to a NFA * @param nfa target NFA * @param state the NFA state to be added * @returns void */
misc/mcnaughton_yamada_thompson.c:369
↓ 2 callers
Function
addWordToTree
* @brief Adds word (node) to the correct position in tree * @param word word to be inserted in to the tree * @param currentNode node which is being
data_structures/binary_trees/words_alphabetical.c:144
↓ 2 callers
Function
add_digit
* Function that allocates memory to add another * digit at the MSB */
project_euler/problem_20/sol1.c:37
↓ 2 callers
Function
add_item_label
data_structures/dictionary/dict.c:49
↓ 2 callers
Function
binarysearch1
Recursive implementation * \param[in] arr array to search * \param l left index of search range * \param r right index of search range * \param x
searching/binary_search.c:21
↓ 2 callers
Function
binarysearch2
Iterative implementation * \param[in] arr array to search * \param l left index of search range * \param r right index of search range * \param x
searching/binary_search.c:51
↓ 2 callers
Function
bisection
* @brief Root-finding method for a continuous function given two values with * opposite signs * @param x_left Lower endpoint value of the interval
numerical_methods/bisection_method.c:58
↓ 2 callers
Function
calculateScore
games/naval_battle.c:442
↓ 2 callers
Function
calculate_next_xy
* @brief calculates the value of x or y and push those into the small 'queues' * * @details Both x and y are found by taking their value from 2 iter
math/euclidean_algorithm_extended.c:54
↓ 2 callers
Function
canShoot
games/naval_battle.c:107
↓ 2 callers
Function
charsCount
leetcode/src/1657.c:3
↓ 2 callers
Function
checkwin
* @brief Implementation of win conditon checker for 'X' or 'O' whenever the table is updated * * @returns -1: if 'X' won * @returns -2: if 'O' won
games/tic_tac_toe.c:334
↓ 2 callers
Function
countCharsForStringSlice
leetcode/src/567.c:3
↓ 2 callers
Function
countPalin
leetcode/src/647.c:19
↓ 2 callers
Function
createGraph
Allocate memory for the entire graph structure
data_structures/graphs/strongly_connected_components.c:164
↓ 2 callers
Function
createNode
Memory for a graph node
data_structures/graphs/bfs.c:106
↓ 2 callers
Function
createNode
Allocate memory for a node
data_structures/graphs/dfs.c:81
← previous
next →
101–200 of 1,322, ranked by callers