DTD.Sort.Net 1.0.0

Just as the name suggests this is just another sorting library for .Net Core.

Install-Package DTD.Sort.Net -Version 1.0.0
dotnet add package DTD.Sort.Net --version 1.0.0
<PackageReference Include="DTD.Sort.Net" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DTD.Sort.Net --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Yet Another Sorting Library

Just as the name suggests this is just another sorting library for .Net Core.

Total alerts
Language grade: C#

Available Algorithms

| Description | Done | Comment |
|-------------------------|------|---------|
| Bubble Sort| ✔ |
| Insertion Sort| ✔ |
| Merge Sort| ✔ | Recursive
| Quick Sort| ✔ | Recursive
| Selection Sort| ✔ |
| Cocktail Sort| ✔ |

How to use

 int[] UnsortedArray = new[] {1, 5, 6, 2, 4, 3};
 SortDotNet<int>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Real Use Case

Implement IComparable<T> Interface to your model class


public class Product:IComparable<Product>
    {
        public string Id;
        public string Name;
        public float Cost;
        public float Price;

        public int CompareTo(Product other)
        {
            if (Cost > other.Cost) return 1;
            if (Cost < other.Cost) return -1;
            return 0;
        }
    }

Use it just like you would for Base Types


 SortDotNet<Product>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Implementation Credits : https://rosettacode.org/wiki/Category:Sorting_Algorithms

Yet Another Sorting Library

Just as the name suggests this is just another sorting library for .Net Core.

Total alerts
Language grade: C#

Available Algorithms

| Description | Done | Comment |
|-------------------------|------|---------|
| Bubble Sort| ✔ |
| Insertion Sort| ✔ |
| Merge Sort| ✔ | Recursive
| Quick Sort| ✔ | Recursive
| Selection Sort| ✔ |
| Cocktail Sort| ✔ |

How to use

 int[] UnsortedArray = new[] {1, 5, 6, 2, 4, 3};
 SortDotNet<int>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Real Use Case

Implement IComparable<T> Interface to your model class


public class Product:IComparable<Product>
    {
        public string Id;
        public string Name;
        public float Cost;
        public float Price;

        public int CompareTo(Product other)
        {
            if (Cost > other.Cost) return 1;
            if (Cost < other.Cost) return -1;
            return 0;
        }
    }

Use it just like you would for Base Types


 SortDotNet<Product>.Sort(UnsortedArray, SortType.Bubble, SortOrder.Decending);

Implementation Credits : https://rosettacode.org/wiki/Category:Sorting_Algorithms

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 100 8/8/2020