Implement Merge
- Implement the Merge process.
Exercise Open the starter code, the Demo.java
file and complete the implementation of merge
. Your implementation must have time complexity of $\Omicron(n)$.
Hint: It is possible to implement merge with $\Omicron(1)$ auxiliary space (so the whole merge sort process would be in-place). However, it adds unnecessary complexity to the implementation, which gets the essential idea behind the linear-time merge process. So, feel free to implement merge
with $\Omicron(n)$ auxiliary space.
Solution
Please visit the posted solution.