![]() |
17. Sorting18 Questions
Created by Y. Daniel Liang
- http://www.cs.armstrong.edu/liang/index.html
Free
|
Suppose a list is [2, 9, 5, 4, 8, 1]. After the first pass of bubble sort, the list becomes
The best-time complexity for bubble sort is _____________.
The worst-time complexity for bubble sort is _____________.
The time to merge two sorted lists of size n is _________
The worst-time complexity for merge sort is _________
The average-time complexity for merge sort is _________
What is correct about a pivot?
The worst-time complexity for quick sort is _________
The average-time complexity for quick sort is _________
Which of the following statements are true?
To remove the root, you need to start a process by first placing _______ to the place of the root and move it down to maintain the heap property.
To add a new node, you need to start a process by first placing it as _______ and move it up to maintain the heap property.
A heap is represented using a list. Is the list [1, 2, 4, 5, 9, 3] a heap?
A heap is represented using a list. Is the list [64, 42, 59, 32, 39, 44] a heap?
The worst-time complexity for heap sort is _________
The average-time complexity for heap sort is _________
The most efficient algorithm for sorting integer keys is __________.
The __________ algorithm does not compare keys.