MCQOPTIONS
Saved Bookmarks
This section includes 721 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 101. |
Which of these is not an application of linked list? |
| A. | To implement file systems |
| B. | For separate chaining in hash-tables |
| C. | To implement non-binary trees |
| D. | Random Access of elements |
| Answer» E. | |
| 102. |
Accessing and processing each array elements is called __________. |
| A. | sorting. |
| B. | traversing. |
| C. | searching. |
| D. | merging. |
| Answer» C. searching. | |
| 103. |
A _____________ list is a list where the last node contains null pointer. |
| A. | circular header. |
| B. | grounded header. |
| C. | rounded header. |
| D. | linked header. |
| Answer» C. rounded header. | |
| 104. |
What is the best case complexity of selection sort? |
| A. | O(nlogn) |
| B. | O(logn) |
| C. | O(n) |
| D. | O(n2) |
| Answer» E. | |
| 105. |
If binary trees are represented in arrays, what formula can be used to locate a left child, if the nodehas an index i? |
| A. | 2i+1 |
| B. | 2i+2 |
| C. | 2i |
| D. | 4i |
| Answer» B. 2i+2 | |
| 106. |
Which of the following sorting algorithm is stable? |
| A. | Heap sort |
| B. | Selection sort |
| C. | In-place MSD radix sort |
| D. | LSD radix sort |
| Answer» E. | |
| 107. |
What is the disadvantage of selection sort? |
| A. | It requires auxiliary memory |
| B. | It is not scalable |
| C. | It can be used for small keys8 |
| D. | It takes linear time to sort the elements |
| Answer» C. It can be used for small keys8 | |
| 108. |
The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The numberof iterations in selection sort and bubble sort respectively are, |
| A. | 5 and 4 |
| B. | 1 and 4 |
| C. | 0 and 4 |
| D. | 4 and 1 |
| Answer» E. | |
| 109. |
The minimum height of self balancing binary search tree with n nodes is |
| A. | log2(n) |
| B. | n |
| C. | 2n + 1 |
| D. | 2n – 1 |
| Answer» B. n | |
| 110. |
The __________________ denotes the greatest integer. |
| A. | ceiling. |
| B. | time. |
| C. | space. |
| D. | floor. |
| Answer» B. time. | |
| 111. |
The number of edges from the node to the deepest leaf is called of the tree. |
| A. | Height |
| B. | Depth |
| C. | Length |
| D. | Width |
| Answer» B. Depth | |
| 112. |
The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sortrespectively are, |
| A. | 5 and 4 |
| B. | 4 and 5 |
| C. | 2 and 4 |
| D. | 2 and 5 |
| Answer» B. 4 and 5 | |
| 113. |
For the heap sort, access to nodes involves simple _______________ operations. |
| A. | binary. |
| B. | arithmetic |
| C. | algebraic |
| D. | logarithmic |
| Answer» C. algebraic | |
| 114. |
A B-tree of order 4 and of height 3 will have a maximum of keys. |
| A. | 255 |
| B. | 63 |
| C. | 127 |
| D. | 188 |
| Answer» B. 63 | |
| 115. |
Expression into postfix expression: (A - B) * (D / E) |
| A. | ABDE - * / |
| B. | - * / ABDE |
| C. | A B - D E * / |
| D. | * - A B / D E |
| Answer» E. | |
| 116. |
_______________is a header list where the last node points back to the header node. |
| A. | Doubly header List. |
| B. | Singly header List. |
| C. | Grounder Header List. |
| D. | Circular Header List. |
| Answer» E. | |
| 117. |
If FRONT = NULL then _________. |
| A. | queue full |
| B. | queue empty |
| C. | dequeue |
| D. | priority queue |
| Answer» C. dequeue | |
| 118. |
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. | |
| 119. |
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 | |
| 120. |
A full binary tree can be generated using |
| A. | post-order and pre-order traversal |
| B. | pre-order traversal |
| C. | post-order traversal |
| D. | in-order traversal |
| Answer» B. pre-order traversal | |
| 121. |
A string `s` consists of x, y and if x is an empty string then y is called as___________. |
| A. | initial substring. |
| B. | substring of s. |
| C. | node of the string. |
| D. | index. |
| Answer» B. substring of s. | |
| 122. |
Which of the following is the distribution sort? |
| A. | Heap sort |
| B. | Smooth sort |
| C. | Quick sort |
| D. | LSD radix sort |
| Answer» E. | |
| 123. |
An m*n array has _________number of elements. |
| A. | m. |
| B. | n. |
| C. | m2. |
| D. | m*n. |
| Answer» E. | |
| 124. |
Which of the following is not an advantage of optimised bubble sort over other sorting techniquesin case of sorted elements? |
| A. | It is faster |
| B. | Consumes less memory |
| C. | Detects whether the input is already sorted |
| D. | Consumes less time |
| Answer» D. Consumes less time | |
| 125. |
Which of the following is not an advantage of priority queue? |
| A. | Easy to implement |
| B. | Processes with different priority can be efficiently handled |
| C. | Applications with differing requirements |
| D. | Easy to delete elements in any case |
| Answer» E. | |
| 126. |
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. | |
| 127. |
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in whatorder will they be removed? |
| A. | ABCD |
| B. | DCBA |
| C. | DCAB |
| D. | ABDC |
| Answer» B. DCBA | |
| 128. |
Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the midvalues(corresponding array elements) generated in the first and second iterations? |
| A. | 90 and 99 |
| B. | 90 and 100 |
| C. | 89 and 94 |
| D. | 94 and 99 |
| Answer» B. 90 and 100 | |
| 129. |
The space factor when determining the efficiency of algorithm is measured by___________. |
| A. | counting the maximum memory needed by the algorithm. |
| B. | counting the minimum memory needed by the algorithm. |
| C. | counting the average memory needed by the algorithm. |
| D. | counting the maximum disk space needed by the algorithm. |
| Answer» B. counting the minimum memory needed by the algorithm. | |
| 130. |
Arrays are best data structures for _____________________________. |
| A. | relatively permanent collections of data. |
| B. | the size of the structure and the data in the structure are constantly changing. |
| C. | both of above situation. |
| D. | None of the above. |
| Answer» B. the size of the structure and the data in the structure are constantly changing. | |
| 131. |
Shell sort is an improvement on |
| A. | insertion sort |
| B. | selection sort |
| C. | binary tree sort |
| D. | quick sort |
| Answer» B. selection sort | |
| 132. |
The initial configuration of the queue is a,b,c,d (a is the front end). To get the configuration d,c,b,a oneneeds a minimum of ? |
| A. | 2 deletions and 3 additions |
| B. | 3 additions and 2 deletions |
| C. | 3 deletions and 3 additions |
| D. | 3 deletions and 4 additions |
| Answer» D. 3 deletions and 4 additions | |
| 133. |
What is the value of the sum of the minimum in-degree and maximum out-degree of an DirectedAcyclic Graph? |
| A. | Depends on a Graph |
| B. | Will always be zero |
| C. | Will always be greater than zero |
| D. | May be zero or greater than zero |
| Answer» C. Will always be greater than zero | |
| 134. |
The following given tree is an example for? |
| A. | Binary tree |
| B. | Binary search tree |
| C. | Fibonacci tree |
| D. | none |
| Answer» B. Binary search tree | |
| 135. |
The ____________ is used in an elegant sorting algorithm. |
| A. | Heap sort. |
| B. | Quick sort. |
| C. | Merge sort. |
| D. | Radix sort. |
| Answer» B. Quick sort. | |
| 136. |
The hashing file space is divided into_______________. |
| A. | nodes and roots. |
| B. | roots and slots. |
| C. | buckets and slots. |
| D. | slots and nodes. |
| Answer» D. slots and nodes. | |
| 137. |
Pushing an element into stack already having five elements and stack size of 5, then stack becomes |
| A. | Overflow |
| B. | Crash |
| C. | Underflow |
| D. | User flow |
| Answer» B. Crash | |
| 138. |
Identify the data structure which allows deletions at both ends of the list but insertion at only oneend___________. |
| A. | Input-restricted dequeue. |
| B. | Output-restricted dequeue. |
| C. | Priority queues. |
| D. | Data structure. |
| Answer» B. Output-restricted dequeue. | |
| 139. |
The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How manyiterations will be done to sort the array with improvised version? |
| A. | 4 |
| B. | 2 |
| C. | 1 |
| Answer» C. 1 | |
| 140. |
What should be done when a left parenthesis ‘(‘ is encountered? |
| A. | It is ignored |
| B. | It is placed in the output |
| C. | It is placed in the operator stack |
| D. | The contents of the operator stack is emptied |
| Answer» D. The contents of the operator stack is emptied | |
| 141. |
Heap can be used as |
| A. | Priority queue |
| B. | Stack |
| C. | A decreasing order array |
| D. | Normal Array |
| Answer» B. Stack | |
| 142. |
For which of the following combinations of the degrees of vertices would the connected graph beeulerian? |
| A. | 1,2,3 |
| B. | 2,3,4 |
| C. | 2,4,5 |
| D. | 1,3,5 |
| Answer» B. 2,3,4 | |
| 143. |
Selection sort and quick sort both fall into the same category of sorting algorithms._________ is thatcategory. |
| A. | O(n log n) sorts. |
| B. | Divide-and-conquer sorts. |
| C. | Interchange sorts. |
| D. | Average time is quadratic. |
| Answer» D. Average time is quadratic. | |
| 144. |
___________are used to facilitate the processing of information in an array. |
| A. | Pointers. |
| B. | Memory location. |
| C. | Records. |
| D. | Variables. |
| Answer» B. Memory location. | |
| 145. |
How many pointers are necessarily changed for the insertion in a Linked List? |
| A. | 1. |
| B. | 2. |
| C. | 3. |
| D. | 5. |
| Answer» C. 3. | |
| 146. |
An array consists of n elements. We want to create a heap using the elements. The time complexityof building a heap will be in order of |
| A. | O(n*n*logn) |
| B. | O(n*logn) |
| C. | O(n*n) |
| D. | O(n *logn *logn) |
| Answer» C. O(n*n) | |
| 147. |
Which of the following properties are obeyed by all three tree – traversals? |
| A. | Left subtrees are visited before right subtrees |
| B. | Right subtrees are visited before left subtrees |
| C. | Root node is visited before left subtree |
| D. | Root node is visited before right subtree |
| Answer» B. Right subtrees are visited before left subtrees | |
| 148. |
Five node splitting operations occurred when an entry is inserted into a B-tree. Then how manynodes are written? |
| A. | 14 |
| B. | 7 |
| C. | 11 |
| D. | 5 |
| Answer» D. 5 | |
| 149. |
An _________ is a well defined list of steps for solving a problem. |
| A. | Algorithm. |
| B. | Program. |
| C. | Procedure. |
| D. | Process. |
| Answer» B. Program. | |
| 150. |
________ is the situation where data-structure is empty. |
| A. | Overflow. |
| B. | Underflow. |
| C. | Null. |
| D. | Empty. |
| Answer» C. Null. | |