Recursive Implementation
- Implement Merge Sort recursively.
Exercise Open the starter code, the Demo.java
file and complete the implementation of mergesort
.
Assume the merge
method is correctly implemented, and implement mergesort
recursively.
Hint: Merge Sort is naturally recursive:
- Split the sequence into two subsequences (of roughly equal size).
- Sort each subsequence recursively.
- Merge the two (sorted) sub-sequences back together.
Solution
Please visit the posted solution.