Exam 7: Stacks

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The computer uses a stack to implement function calls.

(True/False)
4.8/5
(34)

A data structure in which the elements are added and removed from one end only is known as a ____.

(Multiple Choice)
4.8/5
(30)

Adding, or pushing, an element onto the stack is a two-step process.

(True/False)
4.9/5
(42)

The postfix expression 2 3 + 1 * = evaluates to 8.

(True/False)
4.8/5
(45)

Because all the elements of a stack are of the same type, you can use a(n) ____ to implement a stack.

(Multiple Choice)
4.8/5
(44)

The function discardExp reads and writes the input data only until the input is '____'.

(Multiple Choice)
4.8/5
(41)

The class linkedListType is a(n) ____ class and therefore does not implement all the operations.

(Multiple Choice)
4.9/5
(47)

In the late 1950s, the Australian philosopher and early computer scientist Charles L. Hamblin proposed a scheme in which the operators follow the operands (postfix operators), resulting in the ____ notation.

(Multiple Choice)
4.9/5
(46)

The equivalent postfix expression for the infix expression a + b is + a b.

(True/False)
4.9/5
(31)

You can use stacks to convert recursive algorithms into nonrecursive algorithms, especially recursive algorithms that are not tail recursive.

(True/False)
4.7/5
(38)

If the postfix expression contains no errors, the function ____ prints the result.

(Multiple Choice)
4.8/5
(36)

To successfully implement a stack, we need at least seven operations.

(True/False)
4.9/5
(37)

The stack container class provides the operation size to return the actual number of elements in the stack.

(True/False)
4.7/5
(37)

The stack is empty if stackTop is ____.

(Multiple Choice)
4.7/5
(34)

In ____ notation, the operator is written between the operands.

(Multiple Choice)
4.8/5
(38)

The operation ____ is used to remove the top element from the stack.

(Multiple Choice)
4.8/5
(37)

The time-complexity of the copyStack function is O(1).

(True/False)
4.8/5
(35)

We can perform the operation ____ to retrieve the top element of the stack.

(Multiple Choice)
4.9/5
(43)

To remove, or pop, an element from the stack ____.

(Multiple Choice)
4.8/5
(46)

The item added to the stack last will be the item removed last.

(True/False)
4.8/5
(34)
Showing 21 - 40 of 44
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)