Exam 6: Problem Solving With Abstract Data Types

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

What are the two base cases in a recursive description of a palindrome?

(Essay)
4.9/5
(36)

Induction can be used to prove that a recursive algorithm is correct.

(True/False)
4.8/5
(41)

Which of the following is the postfix form of the infix expression: a * b - (c +d)?

(Multiple Choice)
4.9/5
(33)

When is the base case of the Eight Queens problem reached?

(Essay)
4.9/5
(32)

Which of the following is a prefix expression?

(Multiple Choice)
4.7/5
(32)

Which of the following is NOT a valid postfix expression?

(Multiple Choice)
4.9/5
(37)

Describe in your own words the language defined by this recursive definition: < S > = @ | < W > | @ < S > < W > = aab | aa < W > b

(Essay)
4.8/5
(40)

Which of the following is NOT a valid prefix expression?

(Multiple Choice)
4.8/5
(48)

The stricter the definition of a language,the easier it is for a compiler to recognize a syntactically legal expression.

(True/False)
4.8/5
(29)

Which of the following is a postfix expression?

(Multiple Choice)
4.8/5
(35)

How can precedence and association rules be avoided in infix notation?

(Essay)
4.8/5
(36)

What is a closed-form formula?

(Essay)
4.9/5
(31)

______ is a problem-solving technique that involves guesses at a solution.

(Multiple Choice)
4.7/5
(39)

What is the main benefit of using a grammar that is recursive?

(Essay)
4.8/5
(40)

The empty string is a palindrome.

(True/False)
4.9/5
(34)

Explain how you would design a method,returning boolean,that determines if a string passed as a parameter satisfies this recursive definition. < S > = < W > < W > < W > = a | b | a < W > | b < W >

(Essay)
4.8/5
(37)

Which of the following strings is NOT a palindrome?

(Multiple Choice)
4.8/5
(35)

What is the value of the postfix expression: 6 7 + 8 2 - *?

(Multiple Choice)
4.8/5
(37)

In the recursive solution to the Eight Queens problem,the problem size decreases by ______ at each recursive step.

(Multiple Choice)
4.9/5
(38)

According to the following statement: JavaPrograms = {strings w : w is a syntactically correct Java program} all strings are Java programs.

(True/False)
4.9/5
(35)
Showing 41 - 60 of 60
close modal

Filters

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