插入排序算法代码实现

        //插入排序算法
        private static void sort(int []a)
        {
            int j;
            int temp;
            for(int i = 1;i <a.Length;i++)
            {
                j = i - 1;
                temp = a[i];
                while (temp < a[j] && j >= 0)
                {
                    a[j +1] = a[j];
                    j--;
                }
                a[j + 1] = temp;
            }
        }

原文地址:https://www.cnblogs.com/tianmochou/p/7474159.html