Sorting/ValueBased/insertion.c File Reference

Insertion Sort implementation over value-based arrays. Contains Insertion Sort implementation for value-based arrays. Optimized to use memmove for bulk moves. More...

#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "report.h"

Functions

void sortValues (void *base, int n, int s, int(*cmp)(const void *, const void *))
 Sort the value-based array using Insertion Sort.


Detailed Description

Insertion Sort implementation over value-based arrays. Contains Insertion Sort implementation for value-based arrays. Optimized to use memmove for bulk moves.

Optimized for bulk moves.

Author:
George Heineman
Date:
6/15/08

Function Documentation

void sortValues ( void *  base,
int  n,
int  s,
int(*)(const void *, const void *)  cmp 
)

Sort the value-based array using Insertion Sort.

Algorithm Development Kit 1.0