/*
 *  BubbleSort
 *
 *  20.11.1998, implemented by Michael Neumann (neumann@s-direktnet.de)
 */

# ifndef __BUBBLESORT_HEADER__
# define __BUBBLESORT_HEADER__

# include <algorithm>

template <class itemType, class indexType=int>
void BubbleSort(itemType a[], indexType l, indexType r)
{
	static indexType i, j;

	for(i=r; i>l; --i)
   	for(j=l; j<i; ++j)
      	if(a[j] > a[j+1]) std::swap(a[j], a[j+1]);
}

# endif