Exam 7: Stacks
Exam 1: Review of Java Fundamentals60 Questions
Exam 2: Principles of Programming and Software Engineering60 Questions
Exam 3: Recursion: the Mirrors60 Questions
Exam 4: Data Abstraction: The Walls60 Questions
Exam 5: Linked Lists60 Questions
Exam 6: Problem Solving With Abstract Data Types60 Questions
Exam 7: Stacks60 Questions
Exam 8: Queues60 Questions
Exam 9: Advanced Java Topics60 Questions
Exam 10: Algorithm Efficiency and Sorting60 Questions
Exam 11: Trees60 Questions
Exam 12: Tables and Priority Queues60 Questions
Exam 13: Advanced Implementations of Tables60 Questions
Exam 14: Graphs60 Questions
Exam 15: External Methods30 Questions
Select questions type
What is the restriction that the array-based implementation of a stack places on the push operation?
Free
(Essay)
4.8/5
(31)
Correct Answer:
The restriction that is placed by the array-based implementation of a stack is that it prevents the push operation from adding an item to the stack if the stack's size limit,which is the size of the array,has been reached.
When infix expressions are converted to postfix expressions,the operands always stay in the same order with respect to one another.
Free
(True/False)
4.7/5
(32)
Correct Answer:
True
The ______ method of the ADT stack retrieves the top of the stack,but does not change the stack.
Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
D
Suppose an infix expression contains parentheses as grouping symbols.Is it still possible to convert this expression into postfix notation?
(Short Answer)
4.8/5
(44)
What are the factors which determine the placement of operators when an infix expression is converted to a postfix expression?
(Essay)
4.8/5
(33)
The last-in,first-out (LIFO)property is found in the ADT ______.
(Multiple Choice)
4.7/5
(37)
A program can use the operations of the ADT stack without knowing how the operations are implemented.
(True/False)
4.9/5
(34)
Calls to methods that throw StackException must be enclosed in try blocks.
(True/False)
4.9/5
(40)
In a reference-based implementation of a stack,it is necessary to call the isFull method before calling the push method.
(True/False)
4.9/5
(35)
In a reference-based implementation of a stack,the stack can grow and shrink dynamically.
(True/False)
4.8/5
(36)
What is the corrected input if the following line is typed on a keyboard: yww←dshr←←wd←e
(where ← represents the backspace character)?
(Multiple Choice)
4.7/5
(37)
In the StackInterface class,the push method accepts as its parameter an item that is an instance of ______.
(Multiple Choice)
4.8/5
(42)
An algorithm that uses a stack to implement a nonrecursive solution to the HPAir problem reaches the conclusion that there is no path from an origin city to a destination city only after ______.
(Multiple Choice)
4.8/5
(42)
The ______ method of the ADT stack retrieves and then removes the top of the stack.
(Multiple Choice)
4.9/5
(39)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)