

MCQOPTIONS
Saved Bookmarks
This section includes 66 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
51. |
‘Array implementation of Stack is not dynamic', which of the following statements supports this argument? |
A. | space allocation for array is fixed and cannot be changed during run-time |
B. | user unable to give the input for stack operations |
C. | a runtime exception halts execution |
D. | all of the mentioned |
Answer» B. user unable to give the input for stack operations | |
52. |
Assuming int is of 4bytes, what is the size of int arr[15];? |
A. | 15 |
B. | 19 |
C. | 11 |
D. | 60 |
Answer» E. | |
53. |
What is not a disadvantage of priority scheduling in operating systems? |
A. | A low priority process might have to wait indefinitely for the CPU |
B. | If the system crashes, the low priority systems may be lost permanently |
C. | Interrupt handling |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
54. |
Which of the following is false about a circular linked list? |
A. | Every node has a successor |
B. | Time complexity of inserting a new node at the head of the list is O(1) |
C. | Time complexity for deleting the last node is O(n) |
D. | None of the mentioned |
Answer» C. Time complexity for deleting the last node is O(n) | |
55. |
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(())) are: |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 or more |
Answer» D. 4 or more | |
56. |
When does the ArrayIndexOutOfBoundsException occur? |
A. | Compile-time |
B. | Run-time |
C. | Not an error |
D. | None of the mentioned |
Answer» C. Not an error | |
57. |
What are the advantages of arrays? |
A. | Easier to store elements of same data type |
B. | Used to implement other data structures like stack and queue |
C. | Convenient way to represent matrices as a 2D array |
D. | All of the mentioned |
Answer» E. | |
58. |
What is the time complexity of inserting a node in a doubly linked list? |
A. | O(nlogn) |
B. | O(logn) |
C. | O(n) |
D. | O(1) |
Answer» D. O(1) | |
59. |
Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only.Given the representation, which of the following operation can be implemented in O(1) time?i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked list |
A. | I and II |
B. | I and III |
C. | I, II and III |
D. | I, II and IV |
Answer» C. I, II and III | |
60. |
Which of the following application makes use of a circular linked list? |
A. | Undo operation in a text editor |
B. | Recursive function calls |
C. | Allocating CPU to resources |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
61. |
The prefix form of A-B/ (C * D ^ E) is? |
A. | -/*^ACBDE |
B. | -ABCD*^DE |
C. | -A/B*C^DE |
D. | -A/BC*^DE |
Answer» D. -A/BC*^DE | |
62. |
You are asked to perform a queue operation using a stack. Assume the size of the stack is some value ‘n' and there are ‘m' number of variables in this stack. The time complexity of performing deQueue operation is (Using only stack operations like push and pop)(Tightly bound). |
A. | O(m) |
B. | O(n) |
C. | O(m*n) |
D. | Data is insufficient |
Answer» B. O(n) | |
63. |
What is the result of the following operationTop (Push (S, X)) |
A. | X |
B. | Null |
C. | S |
D. | None of the mentioned |
Answer» B. Null | |
64. |
The process of accessing data stored in a serial access memory is similar to manipulating data on a ________ |
A. | Heap |
B. | Binary Tree |
C. | Array |
D. | Stack |
Answer» E. | |
65. |
You have two jars, one jar which has 10 rings and the other has none. They are placed one above the other. You want to remove the last ring in the jar. And the second jar is weak and cannot be used to store rings for a long time. |
A. | Empty the first jar by removing it one by one from the first jar and placing it into the second jar |
B. | Empty the first jar by removing it one by one from the first jar and placing it into the second jar and empty the second jar by placing all the rings into the first jar one by one |
C. | There exists no possible way to do this |
D. | Break the jar and remove the last one |
Answer» C. There exists no possible way to do this | |
66. |
What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm? |
A. | Linked List |
B. | Stack |
C. | Queue |
D. | Tree |
Answer» C. Queue | |