Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

insertion sort

This is a simple test of an insertion sort subroutine with timing information.
The program will two arrays of random real numbers using insertion sort and time the results. The first array is random numbers. The second array is the first array with a random fraction of values replaced by new ones, in order to demonstrate that insertion sort is faster with nearly-sorted arrays.