Skip to content

Commit

Permalink
second attemtp to solve quicksort issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-den committed Mar 24, 2018
1 parent cfbcbb9 commit 2f551e7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ tasks/quodnon/week_1/count_revercies_cs/bin/
tasks/quodnon/week_1/count_revercies_cs/obj/
tasks/quodnon/**/obj/
tasks/quodnon/**/bin/
tasks/quodnon/**/.suo
# quodnon stuff

*.iml
Expand Down
31 changes: 23 additions & 8 deletions tasks/quodnon/week2/quick_fun/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,34 @@ static void Main(string[] args)
{
Console.WriteLine("Hello World! with good git config ");
var unsortedArr = File.ReadAllText("QuickSort.txt").Split('\n').Select(x => Int32.Parse(x)).ToArray();

/*
* get array
* put it in sorter
* put in counter in sorter
* inside sorter:
* - init 2 indexes
* - take first element
* - swap swap swap
* .
* get result from sorter
*/
Console.WriteLine("Gello, worldd{0}", 1);

}

enum pivotPoint{
Last=0,
First=1,
Middle=2
enum pivotPoint {
Last = 0,
First = 1,
Middle = 2
}

static int[] QuickSort (int [] array, enum pivotPoin, out int counter)
int [] partition(int[] array,
int[] QuickSort(int[] array, pivotPoint point, out int counter)
{

var s = new int[] { 1, 2, 3, 4 };
counter = 10;


return s;
}
}
}
2 changes: 1 addition & 1 deletion tasks/quodnon/week2/quick_fun/QuickSort.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9997,4 +9997,4 @@
8640
7266
5792
9269
9269

0 comments on commit 2f551e7

Please sign in to comment.