Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It's Java programming Question 1 While every recursive method has a recursive case, not every recursive method will have a base case. Group of answer

It's Java programming

Question 1

While every recursive method has a recursive case, not every recursive method will have a base case.

Group of answer choices:

True

False

Question 2

Which of the following represent good uses for recursion, rather than iterative approaches?

Group of answer choices:

  1. Towers of Hanoi
  2. Fibonacci sequence
  3. Traveling problems
  4. Factorial sequence
  5. Folder crawlers
  6. Fractals
  7. In a menu display/handling method, to re-display the menu

Question 3

For a specific problem, if you can think of two straightforward code solutions, one using iteration, and one using recursion, you should typically go with the recursive approach.

Group of answer choices

True

False

Question 4

Backtracking in a recursive solution is implemented using the backtrack keyword.

Group of answer choices:

True

False

Question 5

Which of these concepts is typically not associated with linked lists?

Group of answer choices:

  1. node class
  2. front node reference
  3. private node data
  4. traversing

Question 6

Memory allocation associated with adding to a linked list is less likely to fail than memory allocation associated with adding a new item to an array list.

Group of answer choices:

True

False

Question 7

Which of these should be taken into consideration when testing linked-list code?

Group of answer choices:

  1. empty list
  2. "interesting" thing at the beginning
  3. "interesting" thing at the end
  4. "interesting" thing in the middle
  5. list is full

Question 8

Neither arrays (and typical array algorithms) nor linked lists (and typical linked-list algorithms) use a significant amount of computer stack memory.

Group of answer choices:

True

False

Question 9

Assume no "dummy" nodes are being used. Assume we have a node reference called front. Assume nodes of type Node. Assume the list is not empty. Which of these correctly implements the addAtFront method, which is declared as follows: public void addAtFront(int value) { ... }

Group of answer choices:

  1. Node newNode = new Node(value); front = newNode;
  2. Node newNode = new Node(value); newNode.next = front; front = newNode;
  3. front = new Node(value);
  4. front = value;

Question 10

Select all the correct statements about doubly linked lists (vs. singly linked lists).

Group of answer choices:

  1. They typically have a "tail" or "end" reference as well as a "head" or "front" reference.
  2. The "I went too far" problem is less of a consideration, as you can navigate backwards with ease.
  3. It is not possible to "lose" parts of the list.
  4. They have a "prev" reference in addition to the "next" reference.
  5. Because of the additional references being stored, maintained, you will need two temporary variables when you add new nodes.
  6. When writing test cases, we need to keep in mind the "end" reference as a special case.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions