CSC 345 Section 8.15

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

When Mergsort merges two sorted lists of sizes mm and n into a sorted list of size m+n, it requires how many comparisons? m m+n n+1 O(logm+logn) m+n−1 O(logm+logn+1) n

m+n−1

Which of the following sorting algorithms has a worst case complexity of \Theta(n \log n)Θ(nlogn)? Bubble Sort Mergesort Radix Sort Selection Sort Insertion Sort

Mergesort

Which of the following sorting algorithms has a worst case complexity of (nlogn)? Heap Sort Bubble Sort Radix Sort Selection Sort Insertion Sort

Heap Sort

Consider what happens if someone accidently calls sort on a file that is already sorted. Which of the following sorting methods will be the most effecient if the input is already in sorted order. Selection Sort Insertion Sort Mergesort Bubble Sort

Insertion Sort

A person sorting a hand of cards might reasonably use which sorting algorithm? Quicksort Bubble Sort Mergesort Insertion Sort

Insertion sort

Which of the following sorting methods will be best if the number of swaps done is the only measure of effeciency? Selection Sort Mergesort Insertion Sort Bubble Sort Quicksort

Selection sort

Which sorting algorithm makes use of Insertion Sort's best case behavior? Shellsort Mergesort Radix Sort Heapsort

Shellsort

What do we call the property of a sorting algorithm that gaurantees that records with the same key value occur in the same order in the sorted list as in the original, unsorted list? Linear External Consistent Stable

Stable

How are Selection Sort and Quicksort similar? They are both O(nlogn) sorts They both use divide-and-conquer Both have quadratic average case time They can both swap non-adjacent records

They can both swap non-adjacent records

Selection Sort is generally faster than the Bubble Sort on the same input True False

True


संबंधित स्टडी सेट्स

Sec + Questions on Network Attacks

View Set

Health quiz: Chapter 8 Checkpoint

View Set

Chapter 10 Business Uses for Life Insurance

View Set

BUSML 3380 Topic 7: Transportation Managememt

View Set