CIS

profilerick07

Directions: Answer each of the following questions.  Please ensure that your responses are at least 3 to 5 sentences in length.

1.   What items does a sequential search examine when it is successful?

2.   What is a base case?

3.   What are the four questions that must be considered when constructing a recursive solution?

4.   What is a recurrence relation?

5.   What is the box trace?

6.   What is an activation record?

7.   What elements are included in a method’s local environment?

8.   What are the two base cases for a recursive binary search algorithm?

9.   When is the base case first > last (where first is the index of the first item in the array and last is the index of the last item in the array) reached in a recursive binary search algorithm?

10. When is the base case value == anArray[mid] (where mid is the midpoint of the array) reached in a recursive binary search algorithm?

11. What is a pivot item?

12. What is the base case for the recursive solution to the Towers of Hanoi problem?

13. What are the two factors that contribute to the inefficiency of some recursive solutions?

14. What is a tail-recursive function?

15. Why do some compilers automatically replace tail recursion with iteration?

  • 10 years ago
  • 8
Answer(1)

Purchase the answer to view it

blurred-text
  • attachment
    cis_12.docx
Bids(1)