Skip to content

Commit

Permalink
Update Shell_Sort.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Harikrishnan6336 authored Mar 19, 2020
1 parent 3ff9f74 commit 3303fcc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Shell_Sort/Shell_Sort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void shellsort(int []array, int size)
{
int j, temp = array[i];


//Shift other elements until the correct position of a[i] is found
for (j = i; array[j - g] > temp && j >= g ; j -= g)
array[j] = array[j - g];
Expand Down Expand Up @@ -43,8 +42,8 @@ public static void Main()
}
}

//SAMPLE INPUT AND OUTPUT
/*SAMPLE 1
/*SAMPLE INPUT AND OUTPUT
SAMPLE 1
How many numbers do you want to sort : 7
Enter the numbers :
4
Expand All @@ -55,7 +54,7 @@ public static void Main()
7
5
After sorting : 3 4 4 5 7 9 9
//SAMPLE 2
SAMPLE 2
How many numbers do you want to sort : 5
Enter the numbers :
5
Expand Down

0 comments on commit 3303fcc

Please sign in to comment.