Exam 17: Stacks and Queue

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In the array representation of a stack, the stack is initialized simply by setting stackTop to ____________________.

(Short Answer)
4.8/5
(45)

When a stack is implemented as an array, the array is empty if the value of stackTop is ____.

(Multiple Choice)
4.8/5
(38)

The ____________________ constructor is called when a stack object is passed as a (value) parameter to a function.

(Short Answer)
4.8/5
(37)

The ____ element of the stack is the last element added to the stack.

(Multiple Choice)
4.9/5
(42)

A queue is a First In First Out data structure.

(True/False)
4.8/5
(36)

If you try to add a new item to a full stack, the resulting condition is called a(n) ____.

(Multiple Choice)
4.7/5
(38)

An array is a(n) ____________________ access data structure.

(Short Answer)
4.9/5
(38)

The postfix expression 2 4 6 * + 15 - 21 7 / + = evaluates to ____.

(Multiple Choice)
4.8/5
(39)

In the array representation of a stack, if a value called stackTop indicates the number of elements in the stack, then stackTop-1 points to the top item of the stack.

(True/False)
4.8/5
(32)

The following expression (a - b) * (c + d) is equivalent to which of the following postfix expressions?

(Multiple Choice)
4.9/5
(46)

You can perform the operation ____ to remove the top element from the stack.

(Multiple Choice)
4.8/5
(44)

A technique in which one system models the behavior of another system is called ____.

(Multiple Choice)
4.7/5
(38)

The addition and deletion of elements of a stack occurs only at the ____ of the stack.

(Multiple Choice)
4.8/5
(39)

The postfix expression 5 6 + 4 * 10 5 / - = evaluates to ____.

(Multiple Choice)
4.8/5
(36)

When describing a queuing system, we use the term ____________________ to refer to the time it takes to serve a customer.

(Short Answer)
4.9/5
(47)

What is the output of the following code? ​ ​ What is the output of the following code? ​ ​

(Multiple Choice)
4.8/5
(44)

The expression a + b is the same in both infix notation and postfix notation.

(True/False)
4.9/5
(39)

In ____________________ notation, operators are written after the operands.

(Short Answer)
4.9/5
(41)

The postfix expression 14 2 5 + = will generate an error, because ____.

(Multiple Choice)
4.9/5
(39)

The elements at the ____________________ of the stack have been in the stack the longest.

(Short Answer)
4.9/5
(33)
Showing 21 - 40 of 43
close modal

Filters

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