aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913/Java
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2019-11-24 12:25:02 -0600
committerRossTheRoss <mstrapp@protonmail.com>2019-11-24 12:25:02 -0600
commit6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db (patch)
tree61b50bb1c033827e7c083e5a22adfed5e76904bc /csci1913/Java
parentRedo project (diff)
downloadhomework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar.gz
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar.bz2
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar.lz
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar.xz
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.tar.zst
homework-6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db.zip
Leave this shit be
Diffstat (limited to '')
-rw-r--r--csci1913/Java/project2_strap012.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/csci1913/Java/project2_strap012.java b/csci1913/Java/project2_strap012.java
index bc50856..ee09265 100644
--- a/csci1913/Java/project2_strap012.java
+++ b/csci1913/Java/project2_strap012.java
@@ -62,22 +62,21 @@ class Sort {
//Halving phase
int step = 1;
while (unsorted != null) {
- // Node tL = left, tR = right;
if (step % 2 == 0) { //Odd case
if (right == null) {
right = unsorted;
} else {
- right.next=unsorted;
+
}
} else { //Even case
- if (right == null) {
+ if (left == null) {
left = unsorted;
} else {
- left.next=unsorted;
+
}
}
- unsorted = unsorted.next;
step++;
+ unsorted = unsorted.next;
}
}