static void BubbleSort(IComparable[] array)
{
int i, j;
IComparable temp;
for (i = array.Length - 1; i > 0; i--)
{
for (j = 0; j < i; j++)
{
if (array[j].CompareTo(array[j + 1]) > 0)
{
temp = array[j];
array[j] = array[j + 1];
array[j + 1] = temp;
}
}
}
}
static void BubbleSort<T>(IList<T> list) where T : IComparable<T>
{
for (int i = list.Count - 1; i > 0; i--)
{
for (int j = 0; j < i; j++)
{
IComparable current = list[j];
IComparable next = list[j + 1];
if (current.CompareTo(next) > 0)
{
list[j] = next;
list[j + 1] = current;
}
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有