Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
23 #define ARRAY_ERASED -1
25 #define INVALID_POSITION 1
26 #define POSITION_INIT 2
27 #define POSITION_NOT_INIT 3
28 #define POSITION_EMPTY 4
40 CArray *getCArray(
int size);
46 int insertValueCArray(
CArray *array,
int position,
int value);
47 int removeValueCArray(
CArray *array,
int position);
48 int pushValueCArray(
CArray *array,
int value);
49 int updateValueCArray(
CArray *array,
int position,
int value);
54 int eraseCArray(
CArray *array);
59 int switchValuesCArray(
CArray *array,
int position1,
int position2);
60 int reverseCArray(
CArray *array);
65 int bubbleSortCArray(
CArray *array);
66 int selectionSortCArray(
CArray *array);
67 int insertionSortCArray(
CArray *array);
68 int blenderCArray(
CArray *array);
73 int valueOcurranceCArray(
CArray *array,
int value);
75 int findMaxCArray(
CArray *array);
76 int findMinCArray(
CArray *array);
81 int displayCArray(
CArray *array);
void swap(int *first, int *second)
Swap two values by using pointer.
Definition: bubble_sort.c:31
#define min(a, b)
shorthand for minimum value
Definition: kohonen_som_topology.c:43
#define max(a, b)
shorthand for maximum value
Definition: kohonen_som_topology.c:39
int main(int argc, char **argv)
the main function take one argument of type char* example : .
Definition: c_atoi_str_to_integer.c:72
int c_atoi(const char *str)
the function take a string and return an integer
Definition: c_atoi_str_to_integer.c:16
double complex func(double complex x)
Return value of the function to find the root for.
Definition: newton_raphson_root.c:22
void test_c_atoi()
test the function implementation
Definition: c_atoi_str_to_integer.c:56