MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Preorder is |
| A. | depth first order |
| B. | breadth first order |
| C. | topological order |
| D. | linear order |
| E. | |
| Answer» B. breadth first order | |
| 2. |
What is the formula to be used to calculate the total number of comparisons in bubble sort with n elements after k iterations? |
| A. | (4k*k - k)/2 |
| B. | (2kn - k*k +k)/2 |
| C. | (2kn - k*k - k)/2 |
| D. | (2kn + k*k +k)/2 |
| Answer» A. (4k*k - k)/2 | |
| 3. |
Information about an array used in a program will be stored in |
| A. | symbol table |
| B. | activation record |
| C. | dope vector |
| D. | system table |
| Answer» D. system table | |
| 4. |
Which sorting method is slowest? |
| A. | Quick sort |
| B. | Heap sort |
| C. | Shell sort |
| D. | Bubble sort |
| Answer» E. | |
| 5. |
In a binary max heap containing n numbers, the smallest element can be found in _________ time? |
| A. | O(n) |
| B. | O(log2n) |
| C. | O(1) |
| D. | O(n*n) |
| Answer» B. O(log2n) | |
| 6. |
Choose the correct answer Stack is useful for implementing |
| A. | Radix search |
| B. | BFS |
| C. | Recursion |
| D. | None of these |
| Answer» D. None of these | |
| 7. |
A complete binary tree with 5 levels has how many nodes? (root is level 1) |
| A. | 15 |
| B. | 31 |
| C. | 63 |
| D. | 127 |
| Answer» D. 127 | |
| 8. |
Ashima wants to print a pattern which includes checking and changing a variables value iteratively She decides to use a loop/condition Which of the following options should she use such that the body of the loop/condition is executed at least once whether the variable satisfies the entering condition or not ? |
| A. | Decision-making |
| B. | Iteration |
| C. | Recursion |
| D. | Oops |
| Answer» C. Recursion | |