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);
#define MAX_SIZE
maximum number of elements in the set
Definition: union_find.c:8
#define MAX
max.
Definition: server.c:33
void test()
Test function.
Definition: decimal_to_binary_recursion.c:20
int main()
Driver code.
Definition: server.c:81
#define MAXLINE
maximum characters per line
Definition: udp_client.c:27
char * int_to_string(uint16_t value, char *dest, int base)
Converts an integer value to a null-terminated string using the specified base and stores the result ...
Definition: int_to_string.c:25
#define MAXLINE
maximum characters per line
Definition: udp_server.c:27
int main()
Driver Code.
Definition: int_to_string.c:77
#define PORT
port number to connect to
Definition: udp_server.c:26
int main()
Driver code.
Definition: udp_client.c:35
#define PORT
port number to connect to
Definition: client.c:29
static void test()
Test function.
Definition: int_to_string.c:51
int main()
Driver code.
Definition: client.c:70
void swap(int *first, int *second)
Swap two values by using pointer.
Definition: bubble_sort.c:31
void func(int sockfd)
Continuous loop to send and receive over the socket.
Definition: server.c:47
int main()
Driver code.
Definition: udp_server.c:35
#define PORT
port number to connect to
Definition: udp_client.c:26
int main()
Driver Code.
Definition: decimal_to_binary_recursion.c:34
#define MAX
max.
Definition: client.c:28
#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
#define PORT
port number to connect to
Definition: server.c:34
void func(int sockfd)
Continuous loop to send and receive over the socket.
Definition: client.c:37
int decimal_to_binary(unsigned int number)
Decimal to binary using recursion algorithm.
Definition: decimal_to_binary_recursion.c:14
void test_c_atoi()
test the function implementation
Definition: c_atoi_str_to_integer.c:56
#define SA
shortname for sockaddr
Definition: client.c:30
#define SA
shortname for sockaddr
Definition: server.c:35