home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_05
/
1105034a
< prev
next >
Wrap
Text File
|
1993-03-03
|
288b
|
16 lines
// Copyright (C) 1992 by Nicholas Wilt. All rights reserved.
template<class T>
void
InsertionSort(T *base, int n)
{
for (int i = 1; i < n; i++) {
T temp = base[i];
for (int j = i; j && temp < base[j - 1]; j--)
base[j] = base[j - 1];
base[j] = temp;
}
}