1. We can sort any array of 4 integers using at most _______ comparisons. 2. In
ID: 3569751 • Letter: 1
Question
1. We can sort any array of 4 integers using at most _______ comparisons. 2. In the worst case, quicksort needs O(_______________________) comparisons to sort an array of n integers. 3. In the average mergesort needs O(__________________________) comparisons to sort an array of n integers. 4. We use comparisons to find out if an item occurs in a binary search tree with n items. In the worst case we need O(_______________________) tries. 5. In the average case, quicksort needs O(_______________________) comparisons to sort an array of n integers. 6. We use comparisons to find out if an item occurs in a balanced binary search tree with n items. In the worst case we need O(_______________________) tries. 7. In the worst case, bubblesort needs O(_______________________) comparisons to sort an array of n integers. 8. In the average heapsort needs O(__________________________) comparisons to sort an array of n integers. 9. We can form a binary heap with n items with O(__________________________) comparisons. 10. We can insert an item in a binary heap after O(__________________________) comparisons.
Explanation / Answer
3 O(n^2) O(N Log N) O( Log N) O(N Log N) O(n) O(n^2) O(N Log N) O(n) O( Log N)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.