22-timed-sorting-2/sorting.c
2025-05-07 16:41:09 +02:00

36 lines
1.1 KiB
C

/*-----------------------------------------------------------------------------
* HTBLA-Leonding / Class: 2IHIF
*-----------------------------------------------------------------------------
* Exercise Number: S05
* Title: Sorting support functions
* Author: Marc Tismonar
*-----------------------------------------------------------------------------
* Description:
* Basic support functions for sorting
*-----------------------------------------------------------------------------
*/
#include "sorting.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "bubble_sort.h"
#include "insertion_sort.h"
/**
* This file provides some basic functions for sorting and value initialization.
*
* Implementation hints:
* Either list variant OR array variant of functions is required!
*
* init_random:
* Randomizer functions are provided by `stdlib.h`
*
* The randomizer must be initialized via `srandom(time(NULL));` once before it is used
* Generate random values via function `random()`
* Limit random value to `MAX_VALUE` as defined in `config.h`
*/