Starting from:

$34.99

CS211 Assignment 3 -Objective To implement Radix sort Solution



Command-line argument:
Your program should receive a file (input file) and an integer as command line arguments. A
typical execution will ./a.out input.txt 5
Input file
The input file will be a text file where each line contains a non-negative integer which has exactly d digits where d is the second command-line argument.
Implement Radix sort to sort the integers in the input file in ascending order. The output must be a file named ‘radix.txt’. Every line should contain exactly one integer (the first line contains a smallest integer, and so on). The sorting technique used inside the Radix sort is preferred to be Counting sort, i.e., Counting sort should be used to sort every set of significant digits.
Submission
● The program you submit should output radix.txt when run.
● Follow some coding style uniformly. Provide proper comments in your code.
Evaluation

More products