MCPcopy Create free account

hub / github.com/TheAlgorithms/C / functions

Functions1,322 in github.com/TheAlgorithms/C

↓ 4 callersFunctiontop
data_structures/heap/min_heap.c:134
↓ 4 callersFunctiontop
data_structures/heap/max_heap.c:135
↓ 4 callersFunctionvalidEntryLineColumn
* @brief Function validEntryLineColumn * Responsible for validating entries, for positioning boats * @param line matrix row * @param column matrix
games/naval_battle.c:25
↓ 4 callersFunctionvector_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 callersFunctionxor8
* @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 callersFunctionList_push
Push an element into top of the list */
data_structures/list/list.c:20
↓ 3 callersFunctionList_toArray
Convert list to array */
data_structures/list/list.c:37
↓ 3 callersFunctionStack_print
Print all elements in the stack */
data_structures/stack/stack_linked_list/stack.c:75
↓ 3 callersFunctionadaline_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 callersFunctionboyer_moore_search
Boyer Moore Search algorithm */
searching/pattern_search/boyer_moore_search.c:17
↓ 3 callersFunctioncalculate_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 callersFunctioncelcius_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 callersFunctioncloseFile
* @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 callersFunctioncontains
* @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 callersFunctioncontains
data_structures/dynamic_array/dynamic_array.c:66
↓ 3 callersFunctionconvert
* @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 callersFunctioncreate
* @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 callersFunctiondelete_adaline
delete dynamically allocated memory * \param[in] ada model from which the memory is to be freed. */
machine_learning/adaline_learning.c:89
↓ 3 callersFunctiondestroyNFA
* @brief recursively destroys a NFA * @param nfa pointer to the object to be deleted * @returns void */
misc/mcnaughton_yamada_thompson.c:701
↓ 3 callersFunctiondisplay
Function to display square matrix */
numerical_methods/lu_decompose.c:66
↓ 3 callersFunctiondisplay
numerical_methods/gauss_elimination.c:6
↓ 3 callersFunctiondot_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 callersFunctioneigen_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 callersFunctionempty
data_structures/linked_list/ascending_priority_queue.c:41
↓ 3 callersFunctionempty
data_structures/linked_list/queue_linked_list.c:29
↓ 3 callersFunctionendProgramAbruptly
* @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 callersFunctionfactorial
math/catalan.c:5
↓ 3 callersFunctionfindNode
data_structures/binary_trees/avl_tree.c:233
↓ 3 callersFunctionfork
--------------------------------------------------------------------------*/
client_server/fork.h:218
↓ 3 callersFunctionformatted_string
(header, title, solution, difficulty)
scripts/leetcode_directory_md.py:78
↓ 3 callersFunctionfunc
* @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 callersFunctionfunc
* @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 callersFunctiongetPointKey
leetcode/src/79.c:1
↓ 3 callersFunctiongetTen
leetcode/src/12.c:40
↓ 3 callersFunctiongetTripletId
Returns the id of triplet which the point (i, j) belongs to
leetcode/src/37.c:11
↓ 3 callersFunctionget_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 callersFunctionget_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 callersFunctionincrease
math/prime_factoriziation.c:151
↓ 3 callersFunctioninit
* 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 callersFunctioninitSet
leetcode/src/37.c:1
↓ 3 callersFunctionint_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 callersFunctionisEmpty
* Returns 1 if stack is empty, returns 0 if not empty. */
data_structures/stack.c:155
↓ 3 callersFunctionisempty
* @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 callersFunctionjoin
* @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 callersFunctionjump_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 callersFunctionkohonen_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 callersFunctionkohonen_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 callersFunctionl_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 callersFunctionmin_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 callersFunctionnaive_search
Naive Pattern Search algorithm (brute force way) */
searching/pattern_search/naive_search.c:5
↓ 3 callersFunctionnewNode
Create a new node
data_structures/binary_trees/red_black_tree.c:15
↓ 3 callersFunctionnew_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 callersFunctionoctalToHexadecimal
* @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 callersFunctionpeek
* @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 callersFunctionpoly_add
misc/poly_add.c:73
↓ 3 callersFunctionpop
* @brief Function to pop from the stack * @returns popped number */
misc/postfix_evaluation.c:44
↓ 3 callersFunctionpop
* @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 callersFunctionpowPositive
leetcode/src/50.c:1
↓ 3 callersFunctionprintMessageScore
* @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 callersFunctionprint_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 callersFunctionprint_list
data_structures/list/main.c:7
↓ 3 callersFunctionprintlist
data_structures/linked_list/merge_linked_lists.c:46
↓ 3 callersFunctionrabin_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 callersFunctionroman_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 callersFunctionrot13
* @brief Apply the ROT13 cipher * @param s contains the string to be processed */
cipher/rot13.c:23
↓ 3 callersFunctionrun_length_encode
misc/run_length_encoding.c:27
↓ 3 callersFunctionsave_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 callersFunctionsize
* Returns the size of the stack. */
data_structures/stack.c:150
↓ 3 callersFunctionswap
* @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 callersFunctionswap
sorting/random_quick_sort.c:33
↓ 3 callersFunctiontransit
* @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 callersFunctionF
* @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 callersFunctionLeftRightRotate
data_structures/binary_trees/avl_tree.c:102
↓ 2 callersFunctionList_init
Initial list */
data_structures/list/list.c:11
↓ 2 callersFunctionMAX
Utility function to get the maximum value in ar[]
sorting/radix_sort_2.c:8
↓ 2 callersFunctionQueueEnqueue
insert an int at end of queue
data_structures/graphs/queue.c:47
↓ 2 callersFunctionRightLeftRotate
data_structures/binary_trees/avl_tree.c:109
↓ 2 callersFunctionStack_pop
Pop an element out of the stack */
data_structures/stack/stack_linked_list/stack.c:59
↓ 2 callersFunctionStack_size
Return size of the stack */
data_structures/stack/stack_linked_list/stack.c:39
↓ 2 callersFunctionTop
* @brief Function to get top of the stack * @returns top of stack */
conversions/infix_to_postfix2.c:72
↓ 2 callersFunctionadd
data_structures/dynamic_array/dynamic_array.c:15
↓ 2 callersFunctionaddEdge
Creates a unidirectional graph
data_structures/graphs/strongly_connected_components.c:180
↓ 2 callersFunctionaddMemInfo
* @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 callersFunctionaddState
* @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 callersFunctionaddWordToTree
* @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 callersFunctionadd_digit
* Function that allocates memory to add another * digit at the MSB */
project_euler/problem_20/sol1.c:37
↓ 2 callersFunctionadd_item_label
data_structures/dictionary/dict.c:49
↓ 2 callersFunctionbinarysearch1
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 callersFunctionbinarysearch2
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 callersFunctionbisection
* @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 callersFunctioncalculateScore
games/naval_battle.c:442
↓ 2 callersFunctioncalculate_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 callersFunctioncanShoot
games/naval_battle.c:107
↓ 2 callersFunctioncharsCount
leetcode/src/1657.c:3
↓ 2 callersFunctioncheckwin
* @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 callersFunctioncountCharsForStringSlice
leetcode/src/567.c:3
↓ 2 callersFunctioncountPalin
leetcode/src/647.c:19
↓ 2 callersFunctioncreateGraph
Allocate memory for the entire graph structure
data_structures/graphs/strongly_connected_components.c:164
↓ 2 callersFunctioncreateNode
Memory for a graph node
data_structures/graphs/bfs.c:106
↓ 2 callersFunctioncreateNode
Allocate memory for a node
data_structures/graphs/dfs.c:81
← previousnext →101–200 of 1,322, ranked by callers