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 O(n)\Omicron(n).

Hint: It is possible to implement merge with O(1)\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 O(n)\Omicron(n) auxiliary space.

Solution

Please visit the posted solution.