Prog. Assignment 2
Prog. Assignment 2
Objective
The goal of this assignment is to deepen your understanding of sorting algorithms, lower
bounds in sorting, and order statistics. You will implement, analyze, and compare differ-
ent algorithms, applying the theoretical concepts learned in the course.
Problem Statement
Problem : Sorting Algorithms [40 Marks]
You are required to implement and compare two sorting algorithms: Bucket Sort, Radix
Sort. You will also analyze the performance of these algorithms on different types of
input data.
Tasks:
1. Implementation:
2. Testing:
Test the performance of your sorting algorithms on the following input cases:
– Random data
– Already sorted data
– Reverse-sorted data
– Data with many duplicate elements
Use arrays of size 100, 1000, and 10,000 for your tests.
3. Analysis:
For each sorting algorithm, measure and compare the execution time for the
different input cases. Plot the graph showing the execution time of each case
in different algorithms.
Provide a summary of your findings, including a comparison of when each
algorithm performs best.
1
Submission Guidelines
Code: Submit the source code files for each problem. Ensure your code is well-
commented and follows good coding practices.
Testing: Include the input/output for the test cases you used to validate your
implementation.
Note
You are expected to work individually on this assignment.
Plagiarism will not be tolerated. Any suspected plagiarism will result in penalties
as per the course policy.