CS211-Assignment 4 Merge sort and Quicksort Solved
The objective of this assignment is to implement Merge sort and Quicksort.
Command-line argument:
Your program should receive a file (input file) as a command line argument.
Input file
The input file will be a text file where each line contains a non-negative integer.
Task 1 (Merge sort,) Implement Merge sort to sort the integers in the input file in ascending order. The output must be a file named ‘mergesort.txt’. Every line should contain exactly one integer (the first line contains a smallest integer, and so on).
Task 2 (Quicksort, Implement Quick sort to sort the integers in the input file in ascending order. The output must be a file named ‘quicksort.txt’. Every line should contain exactly one integer (the first line contains a smallest integer, and so on).