C#折半插入排序算法

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

public static void BinarySort (int[] list)
{
    for (int i = 1; i < list.Length; i+ +)
    {
        int low = 0;
        int high = i - 1;
        int Temp = list [i];
  
        //Find
        while (low <= high)
        {
            int mid = (low + high) / 2;
  
            IF (Temp < list [mid])
                high = mid - 1;
            else
                low = mid + 1;
        }
  
        //backward shift
        for (int j = i - 1; j > = low; j-)
            list [j + 1] = list [j];
  
        list [low] = Temp;
    }
}