Multiple Choice
A stack based on a linked list is based on the following code
Class Node{
String element;
Node next;
Node(String el,Node n) {
Element = el;
Next = n;
}
}
Node top = null;
The code for implementing the operation void push(String x) can be written as
A) top = new Node(x,top) ;
B) if (top == full.
Throw new RuntimeException("Overflow".;
Else
Top = new Node(x,top.;
C) top.add(x.;
D) top = add(Node x.;
Correct Answer:

Verified
Correct Answer:
Verified
Q23: Consider a class that uses the following
Q24: A queue invariant is a condition<br>A) obeyed
Q25: Consider a class that uses the following
Q26: Consider a class that uses the following
Q27: In a list implementation of a queue,the
Q29: In a queue implementation that uses an
Q30: Which of the following operations is not
Q31: A queue based on a linked list
Q32: The stack push operation<br>A) is normally implemented
Q33: The stack class provided by the Java