Exam 7: Recursive Algorithms

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

After reading the specifications for a project, a good programmer should put together a set of questions for the person who provided the specifications.

(True/False)
4.8/5
(28)

The pseudocode for an iterative method is shown below. What statement is missing from the area labeled (b)? Sailboat.sail to (target) (a) ( not [sailboat is within 5 meters of target] ) { Do together { Sailboat.turn to face target Sailboat.move forward 2 meters } } (b)

(Multiple Choice)
4.9/5
(37)

Seemingly random events, such as an electronic interference in a telephone circuit, can be described using recursive functions.

(True/False)
4.9/5
(35)

A method that uses linear recursion can very quickly generate many copies of itself to work simultaneously on smaller examples of the overall problem.

(True/False)
4.9/5
(37)

An object is really just a set of instructions describing how to complete a process.

(True/False)
4.9/5
(32)

There is some evidence that the human brain is recursive.

(True/False)
4.9/5
(37)

Often it is better to use recursion instead of iteration for methods that can be written using a simple loop.

(True/False)
4.8/5
(36)

In Alice, the ____ button can be used if you are unhappy with one of your moves.

(Multiple Choice)
4.8/5
(43)

The following short story is considered to be recursive: Once upon a time a young princess was sitting with her father, the king. She said to her father, "My Royal Father, can you read me a story?" Yes, my Royal Daughter," said the king, as he opened the Royal Storybook. He began to read, "Once upon a time a young princess was sitting with her father, the king. She said to her father, 'My Royal Father, can you read me a story?'" "Yes, my Royal Daughter," said the king, as he opened the Royal Storybook. He began to read, "Once upon a time a young princess was sitting with her father, the king. She said to her father, 'My Royal Father, can you read me a story?' . . ."

(True/False)
4.8/5
(44)

The Sierpinski gasket algorithm splits the triangle into four smaller triangles, and then calls itself for three of the four smaller triangles.

(True/False)
4.9/5
(48)
Showing 41 - 50 of 50
close modal

Filters

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