Exam 7: Stacks
Exam 1: Basic Python Programming51 Questions
Exam 2: An Overview of Collections50 Questions
Exam 3: Searching, Sorting, and Complexity Analysis50 Questions
Exam 4: Arrays and Linked Structures50 Questions
Exam 5: Interfaces, Implementations, and Polymorphism50 Questions
Exam 6: Inheritance and Abstract Classes50 Questions
Exam 7: Stacks50 Questions
Exam 8: Queues50 Questions
Exam 9: Lists50 Questions
Exam 10: Trees50 Questions
Exam 11: Sets and Dictionaries50 Questions
Exam 12: Graphs50 Questions
Select questions type
Which of the following is NOT an operation supported by a stack interface?
(Multiple Choice)
4.7/5
(30)
In the algorithm to evaluate a postfix expression, what does the algorithm do when an operator is encountered?
(Multiple Choice)
4.9/5
(36)
In the algorithm to evaluate a postfix expression, what does the algorithm do when an operand is encountered?
(Multiple Choice)
4.8/5
(36)
When using a stack to evaluate the balance of brackets and parentheses in an expression, what is the final step?
(Multiple Choice)
4.9/5
(36)
The first step in evaluating a postfix expression is to scan the expression from left to right.
(True/False)
4.8/5
(29)
In the algorithm that checks for a balanced expression, which of the following is true if a closing bracket is encountered?
(Multiple Choice)
4.8/5
(33)
Using a stack is a good approach to determining if the use of brackets in an expression is balanced.
(True/False)
4.9/5
(34)
Addition and subtraction have higher precedence when evaluating an infix expression.
(True/False)
4.9/5
(45)
The time complexity of the postfix expression evaluation algorithm is O( n2 ) .
(Short Answer)
4.8/5
(38)
Which of the following is NOT an application of stacks in computer science?
(Multiple Choice)
4.8/5
(35)
What is the function of the peek method in a stack implementation?
(Multiple Choice)
4.8/5
(35)
To avoid stack overflow, the stack algorithm should raise an error if an item is added to a full stack.
(True/False)
4.9/5
(41)
When evaluating an arithmetic expression, first you transform it from its postfix form to its infix form.
(True/False)
4.7/5
(39)
When converting from infix form to postfix form, parentheses are added to the equation.
(True/False)
4.9/5
(40)
The Node class for use in the linked structure stack contains three fields: data, next, and previous.
(True/False)
4.8/5
(36)
The operation for removing an item from the stack is called push.
(True/False)
4.8/5
(41)
Stack interfaces implement a peek operation for examining the element at the top of the stack.
(True/False)
4.9/5
(32)
A Python list structure and its methods implement a stack perfectly.
(True/False)
4.9/5
(24)
In a linked structure stack implementation, efficient pushing and popping require adding and removing of nodes at the head of the linked sequence.
(True/False)
4.8/5
(38)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)