Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f319caa

Browse files
committed
Test: sort unit tests
- quicksort implementation test. - insertionsort implementation tests.
1 parent e9b8df4 commit f319caa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
1.59 KB
Binary file not shown.
54 Bytes
Binary file not shown.

‎Data Structures with Java/Code/src/edu/bostonuniversity/utils/SortTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public void doIt() {
1010
long start, end, time;
1111
int[] data;
1212

13-
data = new int[15];
13+
data = new int[20];
1414
for (int i = 0; i < data.length; i++) {
1515
int j = (int) (Math.random() * 100);
1616
data[i] = j;
@@ -21,7 +21,7 @@ public void doIt() {
2121
System.out.println("Starting quick sort");
2222
start = System.nanoTime();
2323
Quicksort.quicksort(data);
24-
//S.quicksort(data);
24+
//Playground.quicksort(data);
2525
end = System.nanoTime();
2626
time = end - start;
2727
System.out.println("Quick sort took: " + time / 1000000000.0 + " seconds");
@@ -36,7 +36,7 @@ public void doIt() {
3636
System.out.println("\n\nStarting insertion sort");
3737
start = System.nanoTime();
3838
Insertionsort.insertionsort(data);
39-
//S.insertionsort(data);
39+
//Playground.insertionsort(data);
4040
end = System.nanoTime();
4141
time = end - start;
4242
System.out.println("Insertion sort took: " + time / 1000000000.0 + " seconds");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /