Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(In C++) Data Structures - Lab 1 Topics covered: Sorting Objective: The objective of this homework is to investigate different sorting algorithms. Task 1: Create
(In C++)
Data Structures - Lab 1 Topics covered: Sorting Objective: The objective of this homework is to investigate different sorting algorithms. Task 1: Create a program that generate an array of sizes n- 10, 100, 500, 5000 and 25000 items. Your program should populate those arrays with randomly generated integers with a value between 0 and the 2n where n is the size of the array. Create an implementation for the following sort operations a. Bubble sort b. Insertion sort c. Merge-sort e. Heap-sort f. Counting sort g. Radix-sort Task 2: 1. Test each of the sort operations and record the time the sort takes to complete. You 2. If any 1 test run takes longer than 5 minutes, you may discontinue that test and record 3. Explain how well or poorly it matches your expectations for performance. Include in the should test each on the same unsorted array to get the best comparison. You should do this for each array size (from task 1) a minimum of 10 times. that the time took longer than 5 minutes. Likewise, should any test crash due to running out of memory, record that as well. lab report a table of performance comparison among various sorting techniques. Task 3: 1. 2. Create a linked list class that can store Student information. The Student information must include First Name, Last Name, MNumbs include any other additional information you wish. In addition to any required members to make the linked list work, include any 3 of the above sort algorithms to support sorting by First Name, Last Name and MNumber (each algorithm sorts by 1 of the 3) and includes a parameter for ascending or descending. Seed your linked list with data for 20 students. Include a menu interface that allows the user to select the sort method and direction and will display the sorted students on the screen. and may 3. 4. 5. 6. Include in the lab report screenshots of input and outputs from various sorting techniques. 1. Write a lab report including the following information: 2. Include input and output files (if any), and any special instructions to compile and run 3. In a group project, submissions must include what each group member has contributed. Lab Submission a. The sections from each task indicated to be included in the lab report. those programs. Data Structures - Lab 1 Topics covered: Sorting Objective: The objective of this homework is to investigate different sorting algorithms. Task 1: Create a program that generate an array of sizes n- 10, 100, 500, 5000 and 25000 items. Your program should populate those arrays with randomly generated integers with a value between 0 and the 2n where n is the size of the array. Create an implementation for the following sort operations a. Bubble sort b. Insertion sort c. Merge-sort e. Heap-sort f. Counting sort g. Radix-sort Task 2: 1. Test each of the sort operations and record the time the sort takes to complete. You 2. If any 1 test run takes longer than 5 minutes, you may discontinue that test and record 3. Explain how well or poorly it matches your expectations for performance. Include in the should test each on the same unsorted array to get the best comparison. You should do this for each array size (from task 1) a minimum of 10 times. that the time took longer than 5 minutes. Likewise, should any test crash due to running out of memory, record that as well. lab report a table of performance comparison among various sorting techniques. Task 3: 1. 2. Create a linked list class that can store Student information. The Student information must include First Name, Last Name, MNumbs include any other additional information you wish. In addition to any required members to make the linked list work, include any 3 of the above sort algorithms to support sorting by First Name, Last Name and MNumber (each algorithm sorts by 1 of the 3) and includes a parameter for ascending or descending. Seed your linked list with data for 20 students. Include a menu interface that allows the user to select the sort method and direction and will display the sorted students on the screen. and may 3. 4. 5. 6. Include in the lab report screenshots of input and outputs from various sorting techniques. 1. Write a lab report including the following information: 2. Include input and output files (if any), and any special instructions to compile and run 3. In a group project, submissions must include what each group member has contributed. Lab Submission a. The sections from each task indicated to be included in the lab report. those programs
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started