MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Shell Sort Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Shell sort is more efficient than insertion sort if the length of input arrays is small. |
| A. | True |
| B. | False |
| Answer» C. | |
| 2. |
Records R1, R2, R3,.. RN with keys K1, K2, K3,.. KN are said to be h-ordered, if ________ |
| A. | Ki <= Ki+h for 1<= i*h <= N |
| B. | Kh <= Ki+h for 1<= i <= N |
| C. | Ki <= Kh for 1<= i <= h |
| D. | Ki <= Ki+h for 1<= i <= N-h |
| Answer» E. | |
| 3. |
If Hibbard increments (h1= 1, h2= 3, h3= 7, , hk = 2k 1) are used in a Shell sort implementation, then the best case time complexity will be ________ |
| A. | O(nlogn) |
| B. | O(n) |
| C. | O(n<sup>2</sup>) |
| D. | O(logn) |
| Answer» B. O(n) | |
| 4. |
An array that is first 7-sorted, then 5-sorted becomes _________ |
| A. | 7-ordered |
| B. | 5-ordered |
| C. | both 2-ordered and 5-ordered |
| D. | both 7-ordered and 5-ordered |
| Answer» E. | |
| 5. |
Shell sort is an improvement on ____ |
| A. | insertion sort |
| B. | selection sort |
| C. | binary tree sort |
| D. | quick sort |
| Answer» B. selection sort | |
| 6. |
Statement 1: Shell sort is a stable sorting algorithm.Statement 2: Shell sort is an in-place sorting algorithm. |
| A. | Both statements are true |
| B. | Statement 2 is true but statement 1 is false |
| C. | Statement 2 is false but statement 1 is true |
| D. | Both statements are false |
| Answer» C. Statement 2 is false but statement 1 is true | |
| 7. |
Shell sort is also known as _____________ |
| A. | diminishing decrement sort |
| B. | diminishing increment sort |
| C. | partition exchange sort |
| D. | diminishing insertion sort |
| Answer» C. partition exchange sort | |