Starting from:

$30

CS211-Assignment 5 Radix sort Solved

The objective of this assignment is to implement Radix sort.

 

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 must be Counting sort, i.e., Couting sort should be used to sort every set of significant digits.

More products