First Upload

This commit is contained in:
2022-02-25 15:33:16 +02:00
commit 0c74d10f0d
295 changed files with 74784 additions and 0 deletions

27
23 - Sort/shell.c Normal file
View File

@@ -0,0 +1,27 @@
#include "General.h"
void ShellSort(int * arr, int size, void Swap(int * num1, int * num2))
{
int gap;
int temp;
unsigned int counter;
if (size != ONE) // fix
{
gap = size / TWO;
temp = arr[gap];
for (counter = ZERO; counter < gap; counter += TWO)
{
if (temp < arr[counter])
{
Swap(&(arr[gap]), &(arr[counter]));
}
}
ShellSort(arr, size, Swap);
}
}
void main(void)
{
}