Data Structures Lerax  v3.0-104-ge031
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
Sorting Algorithms

Functions implementing various sorting algorithms. More...

Functions

void bubblesort (Type *v, int n)
 Sorts an array of integers in ascending order using the bubble sort algorithm.
void insertionsort (Type *v, int n)
 Sorts an array of integers in ascending order using the insertion sort algorithm.
void mergesort (Type *v, int n)
 Sorts an array of integers in ascending order using the merge sort algorithm.
void quicksort (Type *v, int n)
 Sorts an array of integers in ascending order using the quicksort algorithm.
void heapsort (Type *v, int n)
 Sorts an array of integers in ascending order using the heapsort algorithm.
void radixsort (Type *v, int n)
 Sorts an array of integers in ascending order using the radix sort algorithm.
void selectionsort (Type *v, int n)
 Sorts an array of integers in ascending order using the selection sort algorithm.

Detailed Description

Functions implementing various sorting algorithms.

Function Documentation

◆ bubblesort()

void bubblesort ( Type * v,
int n )

Sorts an array of integers in ascending order using the bubble sort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ heapsort()

void heapsort ( Type * v,
int n )

Sorts an array of integers in ascending order using the heapsort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ insertionsort()

void insertionsort ( Type * v,
int n )

Sorts an array of integers in ascending order using the insertion sort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ mergesort()

void mergesort ( Type * v,
int n )

Sorts an array of integers in ascending order using the merge sort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ quicksort()

void quicksort ( Type * v,
int n )

Sorts an array of integers in ascending order using the quicksort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ radixsort()

void radixsort ( Type * v,
int n )

Sorts an array of integers in ascending order using the radix sort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.

◆ selectionsort()

void selectionsort ( Type * v,
int n )

Sorts an array of integers in ascending order using the selection sort algorithm.

Parameters
vThe array to sort.
nThe number of elements in the array.