From 75b5b65d3793fa5b05799ea3e0ae79b2e4849cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Fri, 23 May 2014 09:54:56 +0200 Subject: [PATCH] QuickSortDaniel entfernt (kompiliert nicht) --- inf3.csproj | 1 - src/QuickSortDaniel.cs | 67 ------------------------------------------ 2 files changed, 68 deletions(-) delete mode 100644 src/QuickSortDaniel.cs diff --git a/inf3.csproj b/inf3.csproj index 7f7f257..ecd81fb 100644 --- a/inf3.csproj +++ b/inf3.csproj @@ -57,7 +57,6 @@ - diff --git a/src/QuickSortDaniel.cs b/src/QuickSortDaniel.cs deleted file mode 100644 index 7c34995..0000000 --- a/src/QuickSortDaniel.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace WorldOfPeacecraft -{ - class QuickSortDaniel - { - private IList SortFiles; - public QuickSortDaniel(IList SortFiles) - { - this.SortFiles = SortFiles; - doSort(0, SortFiles.Count-1); - } - - private void doSort(int start, int end) - { - if (start != end) - { - - int size = SortFiles.Count; - T pivot; - T comparer; - int pivotpos = start; - int comppos = end; - - pivot = SortFiles[pivotpos]; - comparer = SortFiles[comppos]; - - while (pivotpos != comppos) - { - do - { - if (comppos > pivotpos) - { - comppos = comppos - 1; - comparer = SortFiles[comppos]; - } - else - { - comppos = comppos + 1; - comparer = SortFiles[comppos]; - } - } while (pivot < comparer); - - int tmp = comppos; - SortFiles[comppos] = pivot; - SortFiles[pivotpos] = comparer; - pivotpos = comppos; - comppos = tmp; - } - doSort(start, pivotpos-1); - doSort(pivotpos+1, end); - } - } - - - private IList getSortedList() - { - return SortFiles; - } - - - - } -}