CS 1400 Lab 24: Bubble Sort
The objective of this lab is to build your understanding of sorting arrays.
After completing this lab, you should be able to
You should have reviewed the material on designing a bubble sort before starting this assignment. Create a new project in Visual Sudio. Download the program bsort.cs and add it to the project.
The program, as written, sorts an array of integers in ascending order (the smallest number is first). For this exercise, all you need to do is to change the program so that it sorts the array in descending order (the biggest number is first). If you understand how the sort algorithm works, this should be quite easy to do.
Study the following block of code carefully. When you submit your lab, add a comment to your submission that answers the following questions about this code:
for (int j = 0; j < 3; j++)
(1) When the code above is executed, how many times is this statement executed?
(2) A bubble sort is not very efficient. Write down one reason why it is not.
File(s) to Submit:
Place your complete project folder in a zip file and name the zip file