61. Which of the following is not an advantage of a priority queue?
62. 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.
63. The essential condition which is checked before deletion in a linked queue is?
64. If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, in what order will they be removed?
65. 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).
66. Linked list data structure offers considerable saving in . . . . . . . .
67. Consider these functions:
push() : push an element into the stack
pop() : pop the top-of-the-stack element
top() : returns the item stored in top-of-the-stack-node
What will be the output after performing these sequence of operations.
push(20);
push(4);
top();
pop();
pop();
push(5);
top();
push() : push an element into the stack
pop() : pop the top-of-the-stack element
top() : returns the item stored in top-of-the-stack-node
What will be the output after performing these sequence of operations.
push(20);
push(4);
top();
pop();
pop();
push(5);
top();68. What is the space complexity of a linear queue having n elements?
69. What is the functionality of the following piece of code?
public int function(int data)
{
Node temp = head;
int var = 0;
while(temp != null)
{
if(temp.getData() == data)
{
return var;
}
var = var+1;
temp = temp.getNext();
}
return Integer.MIN_VALUE;
}
public int function(int data)
{
Node temp = head;
int var = 0;
while(temp != null)
{
if(temp.getData() == data)
{
return var;
}
var = var+1;
temp = temp.getNext();
}
return Integer.MIN_VALUE;
}70. What is the time complexity of enqueue operation?
Read More Section(Introduction to Data Structures)
Each Section contains maximum 100 MCQs question on Introduction to Data Structures. To get more questions visit other sections.
