[Solved] CS 211 Data Structures and Algorithms Lab Assignment 5

$25

File Name: CS_211_Data_Structures_and_Algorithms_Lab_Assignment_5.zip
File Size: 508.68 KB

SKU: [Solved] CS 211 Data Structures and Algorithms Lab Assignment 5 Category: Tag:
5/5 - (1 vote)

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.

Submission

  • The program you submit should output radix.txt when run.
  • The main file of your program should be named as <roll no>.<extension>, where roll no. specifies your roll no. and the extension depends on the language you choose (Usage of C/C++ is mandatory for this assignment). Ex: 180040001.c
  • Test well before submission. You may use the attached sample input file for testing. The corresponding output file is also attached. We have some hidden inputs with us to test your program. The mark you obtain is purely based on whether your program correctly gives outputs for the hidden inputs.
  • If your program has only a single source file, please submit the file as it is. If your program has multiple source files, please submit your code as a zip file where the name of the zip file should be your roll number. It is important that you follow the input/output conventions exactly (including the naming scheme) as we may be doing an automated evaluation. There will be a penalty of 10% (on the mark you deserve otherwise) if you do not follow the naming conventions exactly.
  • Follow some coding style uniformly. Provide proper comments in your code.
  • Submit only through moodle. Submit well in advance. Any hiccups in the moodle/internet at the last minute is never acceptable as an excuse for late submission. Submissions through email or any other means will be ignored.
  • Acknowledge the people (other than the instructor and TA) who helped you to solve this assignment. The details of the help you received and the names of the people who helped you (including internet sources, if applicable) should come in the beginning of the main file as a comment. Copying others programs is a serious offence and deserving penalty will be imposed if found.

Evaluation

  • To consider for first evaluation without penalty, you have to submit your program by 5th October (11:59 pm). If you submit after 5th October but on or before 12th October (11:59 pm), there will be a penalty of 10% on the marks you deserve otherwise.
  • If you do not submit by 12th October, your program will not be considered for the first evaluation.
  • We will do the first evaluation after 12th October. The marks you obtain will be proportional to the number of correct lines in the output files. We will use the diff program to check the differences between the correct output file and the output file generated by your program. So, you may verify the correctness of output file by using diff program with sample output file before submission. (See the man page of diff for more info).

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS 211 Data Structures and Algorithms Lab Assignment 5
$25