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
If a stack is used in a nonrecursive solution to the HPAir problem,when is it necessary to backtrack from a city?
(Essay)
4.9/5
(34)
If 5 items are added to a stack,the first item to be removed from the stack is the first item that was added to the stack.
(True/False)
4.7/5
(41)
What is the value of the following postfix expression: 5 2 - 8 4 + *?
(Multiple Choice)
4.8/5
(41)
The push operation throws a StackException when it tries to ______.
(Multiple Choice)
4.9/5
(40)
When a recursive call to a method occurs,the compiler's implementation must remember all of the following information EXCEPT ______.
(Multiple Choice)
4.9/5
(38)
Which of the following is the postfix form of the infix expression: (a +b)* c / d
(Multiple Choice)
4.8/5
(36)
The ______ method of the ADT stack adds an item to the top of the stack.
(Multiple Choice)
4.9/5
(38)
What are the three facts about converting from infix expressions to postfix expressions?
(Essay)
4.8/5
(31)
In a graph that represents the flight map for the HPAir problem,if a flight exists from city C1 to city C2,then the path from C1 to C2 is called a _______.
(Multiple Choice)
4.8/5
(42)
The item that is removed first from a stack is called the ______ of the stack.
(Multiple Choice)
4.8/5
(46)
The pop operation throws a StackException when it tries to ______.
(Multiple Choice)
4.8/5
(43)
Describe an example of a game in which the logic of the game makes use of a stack.
(Essay)
5.0/5
(37)
Which of the following methods of the ADT stack accepts a parameter?
(Multiple Choice)
4.8/5
(37)
Explain how a stack can be used to determine if an infix expression is correctly parenthesized.
(Essay)
4.8/5
(38)
Suppose we begin with an empty stack,and perform the following operations: push 7,push 2,push 9,push 6,pop,pop,peek,push 1,push 3,peek,push 8,pop,peek,pop,pop,push 5,push 4,pop,pop,pop,push 8.What is contained on the stack when we are done? Write out the contents from top to bottom.
(Essay)
4.9/5
(46)
Showing 41 - 60 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)