C#四种排序算法
From :http://www.uml.org.cn/net/200603242.htm
using System;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace BubbleSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
{ public class BubbleSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public void Sort(int [] list)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ int i,j,temp;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
bool done=false;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
j=1;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
while((j<list.Length)&&(!done))
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ done=true;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(i=0;i<list.Length-j;i++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
if(list[i]>list[i+1])
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
done=false;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
temp=list[i];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[i]=list[i+1];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[i+1]=temp;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
j++; }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public class MainClass
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public static void Main()
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int[] iArrary=new int[]{1,5,13,6,10,55,99,2,87,12,34,75,33,47};
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
BubbleSorter sh=new BubbleSorter();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
sh.Sort(iArrary);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int m=0;m<iArrary.Length;m++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.Write("{0} ",iArrary[m]);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
using System;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace SelectionSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
{ public class SelectionSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ private int min;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public void Sort(int [] list)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ for(int i=0;i<list.Length-1;i++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ min=i;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int j=i+1;j<list.Length;j++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ if(list[j]<list[min])
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
min=j;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int t=list[min];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[min]=list[i];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[i]=t;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public class MainClass
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public static void Main()
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int[] iArrary=new int[]{1,5,3,6,10,55,9,2,87,12,34,75,33,47};
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
SelectionSorter ss=new SelectionSorter();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
ss.Sort(iArrary);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int m=0;m<iArrary.Length;m++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.Write("{0} ",iArrary[m]);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
using System;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace InsertionSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
{ public class InsertionSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public void Sort(int [] list)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ for(int i=1;i<list.Length;i++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ int t=list[i];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int j=i;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
while((j>0)&&(list[j-1]>t))
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ list[j]=list[j-1];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
--j;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[j]=t; }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public class MainClass
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public static void Main()
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int[] iArrary=new int[]{1,13,3,6,10,55,98,2,87,12,34,75,33,47};
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
InsertionSorter ii=new InsertionSorter();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
ii.Sort(iArrary);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int m=0;m<iArrary.Length;m++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.Write("{0}",iArrary[m]);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
using System;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace ShellSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public class ShellSorter
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public void Sort(int [] list)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int inc;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(inc=1;inc<=list.Length/9;inc=3*inc+1);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(;inc>0;inc/=3)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int i=inc+1;i<=list.Length;i+=inc)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int t=list[i-1];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int j=i;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
while((j>inc)&&(list[j-inc-1]>t))
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[j-1]=list[j-inc-1];
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
j-=inc;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
list[j-1]=t;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public class MainClass
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{ public static void Main()
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
int[] iArrary=new int[]{1,5,13,6,10,55,99,2,87,12,34,75,33,47};
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
ShellSorter sh=new ShellSorter();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
sh.Sort(iArrary);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
for(int m=0;m<iArrary.Length;m++)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.Write("{0} ",iArrary[m]);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
} }
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
}
【导读】本文介绍了C#的四种排序算法:冒泡排序、选择排序、插入排序和希尔排序
冒泡排序
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
选择排序
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
插入排序
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
希尔排序
希尔排序是将组分段,进行插入排序.
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)