Skip to content

Commit d4bd9e7

Browse files
committed
Replaced the left sorts to the new package
1 parent 52d1182 commit d4bd9e7

3 files changed

Lines changed: 8 additions & 86 deletions

File tree

Sorts/cyclesort.java

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import java.util.*;
1+
package sort;
2+
3+
import java.util.Arrays;
24

3-
class Radix {
5+
class RadixSort {
46

57

6-
static int getMax(int arr[], int n)
7-
{
8+
private static int getMax(int arr[], int n) {
89
int mx = arr[0];
910
for (int i = 1; i < n; i++)
1011
if (arr[i] > mx)
1112
mx = arr[i];
1213
return mx;
1314
}
14-
15-
static void countSort(int arr[], int n, int exp)
15+
16+
private static void countSort(int arr[], int n, int exp)
1617
{
1718
int output[] = new int[n];
1819
int i;
@@ -35,8 +36,7 @@ static void countSort(int arr[], int n, int exp)
3536
arr[i] = output[i];
3637
}
3738

38-
static void radixsort(int arr[], int n)
39-
{
39+
private static void radixsort(int arr[], int n) {
4040

4141
int m = getMax(arr, n);
4242

0 commit comments

Comments
 (0)