- Details
- Parent Category: Programming Assignments' Solutions

# We Helped With This Python Programming Homework: Have A Similar One?

Category | Programming |
---|---|

Subject | Python |

Difficulty | College |

Status | Solved |

More Info | Python Coding Help |

## Assignment Description

Task 1 (16 points):

Please define functions to build these algorithm from zero

1. Implement bubble sort (descending order)

2. Implement selection sort (descending order)

3. Implement insertion sort (descending order)

4. Implement counting sort (ascending order)

Task 2 (15 points): Given an input array with length of 500,1000,2000,4000,8000,16000,80000 Run your code that you implemented in the task 1 with different cases,

1. Assume given array does not have specific order.

2. Assume given array has been sorted in ascending order.

3. Assume given array has been sorted in descending order. and draw plots of average runtime for each case

To compute average runtime, as we discussed in class, you may want to run the same algorithm for k times(k can be 5,6,7,8,9,10) , then compute average of the time.

Task 3: (9 points) For those cases:

1. Array is given with no specific order.

2. Array is sorted in ascending order.

3. Array is sorted in descending order.

Give an order of required runtime according to the plot you attached. Briefly describe why is that. For example, I assume Runtime(counting sort)> Runtime(selection sort)>Runtime(insertion sort)>Runtime(bubblesort), the reason is...

Built in function sort() and sorted() are not allowed to use as you are expected to build everything from zero.

You are required to submit a report for the result and a jupyter notebook file for the code in this project