[SOLVED] public class MergeSort

$25

File Name: public_class_MergeSort.zip
File Size: 207.24 KB

5/5 - (1 vote)

public class MergeSort

private static final Random RNG new Random10982755L;
private static final intLENGTH524288;

public static void mainString args
int arrrandomIntArray;
long startSystem.currentTimeMillis;
concurrentMergeSortarr;
long endSystem.currentTimeMillis;
if !sorteda
System.err.printlnThe final array is not sorted;
System.exit0;

System.out.printf10d numbers: 6d msn, LENGTH, endstart;

private static int randomIntArray
int arrnew intLENGTH;
for int i0; iarr.length; i
arriRNG.nextIntLENGTH10;
return arr;

public static boolean sortedint arr
return !IntStream.range1, arr.length
.mapToObjiarri1arri
.findFirst.orElsefalse;

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] public class MergeSort
$25