![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
胤长風
这个作者很懒,什么都没留下…
展开
-
冒泡排序(一:检测到没有数据发生交换时立即终止循环,输出结果)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 冒泡排序拓展{ class Program { /// <summary> ///...原创 2018-09-13 11:23:46 · 1556 阅读 · 0 评论 -
冒泡排序(二:通过使用泛型和委托,实现通用排序方法)
首先是冒泡排序方法:因为方法是通用的,并不知道需要进行排序的类型是什么,所以需要使用泛型,传入的数组也是该泛型数组。比较过程中,需要用到的方法通过委托作为参数传递到冒泡排序方法内。代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using Syst...原创 2018-09-13 11:23:30 · 695 阅读 · 0 评论