Exam 7: Stacks

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

What is an activation record?

(Essay)
5.0/5
(33)

If the array: 6,2,7,13,5,4 Is added to a stack,in the order given,which number will be the first number to be removed from the stack?

(Multiple Choice)
4.7/5
(32)

If the array: 6,21,35,3,6,2,13 Is added to a stack,in the order given,which of the following is the top of the stack?

(Multiple Choice)
4.9/5
(40)

The first in,first out (FIFO)property is found in the ADT ______.

(Multiple Choice)
4.8/5
(34)

Why does the ADT stack not define a get( )method?

(Essay)
4.8/5
(44)

Given the language L,where: L = {w$w' : w is a possibly empty string of characters other than $, W' = reverse(w)} Which of the following strings is NOT in L?

(Multiple Choice)
4.9/5
(36)

In a graph that represents the flight map for the HPAir problem,if a flight exists from city C1 to city C2,then C2 is said to be ______ C1.

(Multiple Choice)
4.8/5
(39)

Typically,______ are used by a compiler to implement recursive methods.

(Multiple Choice)
5.0/5
(32)

If the array: 6,2,7,13,5,4 Is added to a queue,in the order given,which number will be the first number to be removed from the queue?

(Multiple Choice)
4.8/5
(31)

Which of the following is NOT true about converting infix expressions to postfix expressions?

(Multiple Choice)
5.0/5
(42)

Which of the following methods is NOT called by the nonrecursive stack version of the isPath method?

(Multiple Choice)
4.7/5
(42)

What is the advantage of an implementation of a stack that uses the ADT list over an implementation that uses a linked list?

(Essay)
4.9/5
(36)

In the StackInterface class,the pop method returns an item that is an instance of ______.

(Multiple Choice)
4.7/5
(33)

If a stack is used by an algorithm to check for balanced braces,which of the following is true once the end of the string is reached?

(Multiple Choice)
4.7/5
(49)

What is a directed path?

(Essay)
4.8/5
(43)

Which of the following operations of the ADT stack does not throw a StackException?

(Multiple Choice)
4.7/5
(35)

How can a StackException be avoided in an array-based implementation of a stack when a fixed-size array is used?

(Essay)
5.0/5
(36)

______ are considered when choosing the next city to visit in a stack-based nonrecursive solution to the HPAir problem.

(Multiple Choice)
4.8/5
(35)

Write the axiom for specifying that the last item inserted into a stack is the first item to be removed.

(Essay)
4.8/5
(44)

How can the condition,when you reach the end of the string,you have matched each "{",be verified in a program that uses a stack to check for balanced braces?

(Essay)
4.9/5
(34)
Showing 21 - 40 of 60
close modal

Filters

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