项目作者: ExtraBB

项目描述 :
A Sorting suite written in C#
高级语言: C#
项目地址: git://github.com/ExtraBB/SortSuite.git
创建时间: 2020-04-01T14:54:15Z
项目社区:https://github.com/ExtraBB/SortSuite

开源协议:

下载


SortSuite

This package is written as a programming exercise for implementing sorting algorithms and publishing on NuGet.

Supported sorting algorithms

  • Selection Sort (O(n^2))
  • Quicksort (O(n log n))
  • Mergesort (O(n log n)) (Can be run in parallel)

Nuget Package

When using the nuget package, you can use the sorting algorithms as follows:

  1. using SortSuite;
  2. class Class1 {
  3. static void Main(string[] args) {
  4. int[] items = new int[]{3, 9, 2, 5, 6, 1, 2, 3, 0};
  5. ISortingAlgorithm sorter = new MergeSort();
  6. sorter.Sort(items); // items is now sorted;
  7. }
  8. }

There is also a SortParallel function which runs async and is currently implemented for MergeSort.

SortSuiteTool

You can use this Console tool to generate data, run benchmarks, sort files etc. It can also be used from the CLI, run ./SortSuiteTool --help to see the options.