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 8269626

Browse files
committed
Test: unit tests
- unit test quicksort. - unit test insertionsort.
1 parent d134d46 commit 8269626

File tree

1 file changed

+2
-2
lines changed
  • Data Structures with Java/Code/src/edu/bostonuniversity/playground

1 file changed

+2
-2
lines changed

‎Data Structures with Java/Code/src/edu/bostonuniversity/playground/Playground.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private static void insertionsort(int[] data, int n) {
66

77
for (i = 1; i <= n; i++) {
88
lt = i - 1;
9-
while (lt>= 0 && data[lt] > data[i]) { swap(data, lt--, i--); }
9+
while (lt>= 0 && data[lt] > data[i]) { swap(data, lt--, i--); }
1010
}
1111
}
1212

@@ -47,7 +47,7 @@ private static void quicksort(int[] data, int lo, int hi) {
4747
quicksort(data, gt + 1, hi);
4848
}
4949

50-
public static void quicksort(int[] data) { quicksort(data,0,data.length - 1); }
50+
public static void quicksort(int[] data) { quicksort(data,0, data.length - 1); }
5151

5252
private static void swap(int[] data, int lo, int hi) {
5353
int temp = data[lo];

0 commit comments

Comments
(0)

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