From 6f3fa4d8c1f8947af05ba91077d585f5b1f0d8db Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Sun, 24 Nov 2019 12:25:02 -0600 Subject: Leave this shit be --- csci1913/Java/project2_strap012.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'csci1913/Java') 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; } } -- cgit v1.2.3