diff options
Diffstat (limited to 'csci1913')
-rw-r--r-- | csci1913/Java/project2_strap012.java | 11 |
1 files 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; } |