File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
source/code/projects/Sorting/Sorting Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+
4+ static class Demo
5+ {
6+ private const int LIST_SIZE = 30 ;
7+
8+ public static void Run ( Action < List < int > > sortingAlgo )
9+ {
10+ List < int > test = new List < int > ( ) ;
11+ Random gen = new Random ( ) ;
12+ for ( int i = 0 ; i < LIST_SIZE ; i ++ )
13+ {
14+ test . Add ( gen . Next ( 50 ) ) ;
15+ }
16+ Displaying < int > . List ( test ) ;
17+ sortingAlgo ( test ) ;
18+ Displaying < int > . After ( test ) ;
19+ }
20+
21+ public static void Run ( Action < List < char > > sortingAlgo )
22+ {
23+ List < char > test = new List < char > ( ) ;
24+ Random gen = new Random ( ) ;
25+
26+ for ( int i = 0 ; i < LIST_SIZE ; i ++ )
27+ {
28+ test . Add ( ( char ) ( gen . Next ( 33 , 127 ) ) ) ;
29+ }
30+ Displaying < char > . List ( test ) ;
31+ sortingAlgo ( test ) ;
32+ Displaying < char > . After ( test ) ;
33+ }
34+
35+
36+ }
You can’t perform that action at this time.
0 commit comments