Python Programing Question Need Help 1explain Role Number Data Exchanges Plays Analysis Se Q43885807
python programing question i need help
1.Explain the role that the number of data exchanges plays inthe analysis of selection sort and bubble sort. What role, if any,does the size of the data objects play?
————————
2.Which configuration of data in a list causes the smallestnumber of exchanges in a selection sort? Which configuration ofdata causes the largest number of exchanges?
————————
3.The method that’s usually used to look up an entry in aphone book is not exactly the same as a binary search because, whenusing a phone book, you don’t always go to the midpoint of thesublist being searched. Instead, you estimate the position of thetarget based on the alphabetical position of the first letter ofthe person’s last name. For example, when you are looking up anumber for “Smith,” you look toward the middle of the second halfof the phone book first, instead of in the middle of the entirebook. Suggest a modification of the binary search algorithm thatemulates this strategy for a list of names. Is its computationalcomplexity any better than that of the standard binarysearch?
————————
4.At what point does an n4 algorithm begin to perform betterthan a 2n algorithm?
————————
5.For problem size n, algorithms A and B perform n2 and ½ n2 +½ n instructions, respectively. Which algorithm does more work? Arethere particular problem sizes for which one algorithm performssignificantly better than the other? Are there particular problemsizes for which both algorithms perform approximately the sameamount of work?
————————
6.Explain why the modified bubble sort still exhibits O(n2)behavior on the average.
————————
7.Explain why insertion sort works well on partially sortedlists.
————————
8.Describe the strategy of quicksort and explain why it canreduce the time complexity of sorting from O(n2) to O(n logn).
————————
9.Why is quicksort not O(n log n) in all cases? Describe theworst-case situation for quicksort and give a list of 10 integers,1–10, that would produce this behavior.
————————
10.The partition operation in quicksort chooses the item atthe midpoint as the pivot. Describe two other strategies forselecting a pivot value.
————————
11.Sandra has a bright idea: when the length of a sublist inquicksort is less than a certain number—say, 30 elements—run aninsertion sort to process that sublist. Explain why this is abright idea.
Expert Answer
Answer to python programing question i need help1.Explain the role that the number of data exchanges plays in the analysis of sele…
OR