I have a few questions about sorting algorithms that really bother me I have been browsing for hours in order to find the answers to my concerns but it seems like there are nothing very helpful to these questions. I would appreciate anything that could put me on the right track to answer to them.


1. bubblesort. (4) What are the conditions you speci cally should test for to ensure that the code works in all cases of
input data? (4) How would you do this testing?

2. insertionsort. (4) What are the conditions you speci cally should test for to ensure that the code works in all cases of
input data? (4) How would you do this testing?

3.  quicksort. (4) What are the conditions you specifically should test for to ensure that the code works in all cases of input
data? (4) How would you do this testing?

4.  heapsort. (4) What are the conditions you specifically should test for to ensure that the code works in all cases of input data? (4) How would you do this testing?

5. (4) How do you \know" (to the extent that you can know) that the sorting functions are producing correct answers?
6. (4) How do you \know" (to the extent that you can know) that the timing function is producing reasonably correct answer

Thank you,