From b654cc6a1cf4b56f08a1f06e7f74a83f29c2758c Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Mon, 25 Nov 2019 11:33:58 -0600 Subject: ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh h --- csci1913/Java/project2_strap012.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/csci1913/Java/project2_strap012.java b/csci1913/Java/project2_strap012.java index 19a7733..ae4be3f 100644 --- a/csci1913/Java/project2_strap012.java +++ b/csci1913/Java/project2_strap012.java @@ -76,6 +76,7 @@ class Sort { unsorted = next; } } + //Sorting (recursive) Phase left = sortNodes(left); right = sortNodes(right); //Combining phase @@ -108,11 +109,11 @@ class Sort { end = temp; } } - // if (left == null) { - // sorted.next=right; - // } else { - // sorted.next=left; - // } + if (left == null) { + end.next=right; + } else { + end.next=left; + } return sorted; } -- cgit v1.2.3