-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
32 lines (22 loc) · 1.7 KB
/
Test.java
File metadata and controls
32 lines (22 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package DataStructures;
import DataStructures.sort.*;
import java.util.Arrays;
import java.util.Random;
/**
* @author Guyue Zhou (SouICry) gzhou.email@gmail.com
* @since 12/23/2015
*/
public class Test {
public static void main(String[] args){
Random gen = new Random();
Integer[] arr = new Integer[200];
for (int i = 0; i < arr.length; i++){
arr[i] = gen.nextInt(200) - 100;
}
Util.printArray(arr);
// Integer[] arr = new Integer[]{1, 13, 14, 15, 27, 27, 49, 55, 58, 71, 80, 119, 122, 124, 137, 137, 146, 196, 199, 201, 222, 222, 248, 260, 260, 263, 268, 273, 273, 273, 278, 283, 306, 316, 321, 346, 346, 357, 378, 389, 398, 400, 403, 410, 413, 415, 426, 437, 451, 465, 501, 503, 512, 539, 545, 548, 556, 571, 577, 585, 595, 615, 623, 633, 635, 636, 646, 661, 665, 676, 699, 712, 741, 761, 764, 765, 782, 792, 792, 802, 822, 823, 824, 824, 840, 850, 853, 855, 867, 869, 873, 875, 876, 883, 886, 906, 944, 953, 956, 970, 978, 997, 1002, 1003, 1014, 1015, 1015, 1025, 1031, 1031, 1033, 1064, 1067, 1108, 1109, 1111, 1117, 1129, 1161, 1163, 1167, 1187, 1187, 1188, 1213, 1217, 1236, 1240, 1260, 1264, 1264, 1272, 1273, 1276, 1290, 1291, 1297, 1301, 1302, 1318, 1318, 1331, 1331, 1338, 1341, 1353, 1356, 1387, 1393, 1394, 1413, 1418, 1421, 1431, 1441, 1469, 1483, 1485, 1498, 1510, 1511, 1519, 1522, 1526, 1530, 1538, 1550, 1556, 1557, 1559, 1579, 1584, 1604, 1619, 1633, 1634, 1649, 1650, 1706, 1710, 1724, 1725, 1730, 1755, 1778, 1784, 1792, 1808, 1808, 1826, 1880, 1904, 1908, 1909, 1930, 1933, 1957, 1967, 1975, 1992 };
QuickSort.sort(arr);
Util.printArray(arr);
System.out.println(Util.isSorted(arr));
}
}