); (int i = 0; i
{fi = new FileInfo (files [i]);. AppendFormat (format, fi.Name, fileSize [i], rndValue [i], time [i]);
} sb.ToString ();
} void threadBegin ()
{(int i = 0; i
{(StreamReader sr = new StreamReader (files [i]))
{[] list = sr.ReadToEnd (). Split (" t n". ToCharArray (), StringSplitOptions.RemoveEmptyEntries). ToArray (); [] iList = new int [list . Length]; (int j = 0; j
{[k] = new int [iList.Length]; (int j = 0; j
} _start = 0; (ref _start); (int k = 0; k
}
} (EventSortEnd! = null) (this);
}
}
Код швидкого сортування
class QuckSorter: FileSorter
{int M; QuckSorter (string name, string [] files, int m)
: base (name, files)
{. M = m;
} override FileSorter Copy (string name, string [] files)
{new QuckSorter (name, files, M);
} void simpleSort (ref int [] list, int start, int end)
{(int i = start; i <= end; i + +) (int j = i; j <= end; j + +) (list [i]> list [j])
{loc = list [i]; [i] = list [j]; [j] = loc;
}
} override void beginSort (ref int [] list, int start, int end)
{len = end - start + 1; (len <= 0)
{;
} if (len <= M)
{(ref list, start, end);
} if (len> M)
{x = list [(start + end)/2]; i = start; j = end;
{(list [i] x) - j; (i <= j)
{loc = list [i]; [i] = list [j]; [j] = loc; + +; j -;
}
} while (i <= j); (start
}
}
}
Код порозрядної сортування
сортування алгоритм файл строковий
...