ExamVeda
Login
Home
1
Queues serve major role in . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
2
What differentiates a circular linked list from a normal linked list?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
3
A linear collection of data elements where the linear node is given by means of pointer is called?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
4
Array implementation of Stack is not dynamic, which of the following statements supports this argument?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
5
Minimum number of queues to implement stack is . . . . . . . .
Discuss
Answer & Solution
Answer: Option D
Solution:
A stack can be implemented using two queues.

In a stack, the Last In First Out (LIFO) principle is followed, while in a queue, the First In First Out (FIFO) principle is used.

To implement stack operations using queues, we need two queues — one to hold the elements temporarily and the other to help reverse the order of insertion.

When performing a push operation, elements are enqueued in such a way that the newly added element appears at the front of the queue, simulating stack behavior.

Alternatively, we can also implement the pop operation by moving elements between the two queues until we reach the desired element to remove.

Hence, the minimum number of queues required to implement a stack is 2.
6
Pushing an element into stack already having five elements and stack size of 5, then stack becomes . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
7
A double-ended queue supports operations like adding and removing items from both the sides of the queue. They support four operations like addFront(adding item to top of the queue), addRear(adding item to the bottom of the queue), removeFront(removing item from the top of the queue) and removeRear(removing item from the bottom of the queue). You are given only stacks to implement this data structure. You can implement only push and pop operations. What's the time complexity of performing addFront and addRear? (Assume 'm' to be the size of the stack and 'n' to be the number of elements)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
8
What data structure would you most likely see in non recursive implementation of a recursive algorithm?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
9
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
10
The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board