diff options
author | RossTheRoss <mstrapp@protonmail.com> | 2019-11-24 12:25:02 -0600 |
---|---|---|
committer | RossTheRoss <mstrapp@protonmail.com> | 2019-11-24 12:25:02 -0600 |
commit | 6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db (patch) | |
tree | 61b50bb1c033827e7c083e5a22adfed5e76904bc /csci1913 | |
parent | Redo project (diff) | |
download | homework-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 'csci1913')
-rw-r--r-- | csci1913/Java/project2_strap012.java | 9 |
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; } } |