File tree Expand file tree Collapse file tree
C#/AceOfSpadesProduc100's Rewritten Grailsort for C# Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ namespace GrailsortTester
6868 //
6969 // Editor: AceOfSpadesProduc100, from DeveloperSort's Java version
7070 //
71- // Current status: Changed from object to angle bracket generics in 4/28/2022. Only ints tested.
71+ // Current status: Only ints tested.
7272
7373 //Credit to phoenixbound for this clever idea
7474 enum Subarray
@@ -77,19 +77,14 @@ enum Subarray
7777 RIGHT
7878 }
7979#nullable enable
80- public class GrailSort < K >
80+ public class GrailSort < K > ( IComparer < K > cmp )
8181 {
8282 private int currBlockLen ;
8383 private Subarray currBlockOrigin ;
8484
8585
8686
87- public readonly IComparer < K > cmp ;
88-
89- public GrailSort ( IComparer < K > cmp )
90- {
91- this . cmp = cmp ;
92- }
87+ public readonly IComparer < K > cmp = cmp ;
9388
9489 private static void GrailSwap ( K [ ] array , int a , int b )
9590 {
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >net6 .0</TargetFramework >
5+ <TargetFramework >net8 .0</TargetFramework >
66 <StartupObject >GrailsortTester.Program</StartupObject >
77 </PropertyGroup >
88
You can’t perform that action at this time.
0 commit comments