Describe the base case of a recursive algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13930259

1.) You are using a language that does not support recursion. What data structure would you use to traverse a binary search tree in order?
A. Queue
B. List
C. Stack
D. Can't traverse a tree in order without recursion

2.) The data structure that keeps track of activation records during the execution of a program
A. Run-time queue
B. Run-time stack
C. Linked list
D. Heap

3.) Which of the following statements could describe the base case of a recursive algorithm?
A. F(x) = x - F(x - 1)
B. If the array length is 100, do nothing
C. All parameters are integers
D. F(0) = 27
E. B and D above

4.) IntFunc(/*in*/int n)
{
If (n == 5)
Return 5;
Else
Return 2 * Func (n+1);
}
What is the value of the expression Func (2)?

5.) The three-question testing method is based on what computing technique?
A. Top-down design
B. Object-oriented design
C. Induction
D. Divide/conquer
E. Answer not shown

6.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
What level is the value of 17 ( root is level 0)?
A. 0
B. 1
C. 2
D. 3
E. 4

7.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
Which is the inorder successor of 15?
A. 10
B. 9
C. 17
D. 7
E. 44

8.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
How many levels are in the tree?
A. 3
B. 4
C. 5
D. 6
E. Unknown

9.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
Which is the inorder predecessor of 44?

A. 29
B. 30
C. 21
D. 33
E. Unknown

10.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
How many nodes are there on level 2 (root is level 0)?
A. 2
B. 3
C. 4
D. 5
E. Unknown

11.) The value property of heaps says that the value in a node is
A. Greater than the values of its children.
B. Less than the values of its children.
C. Greater than or equal to the values in its children.

12.) ReheapDown restores the heap property after
A. An insertion
B. A deletion

13.) An adjacency matrix is a way of representing
A. Vertices
B. Edges
C. Vertices and edges

14.) A heap must be a full binary tree.
A. True
B. False

15.)Two or more keys that produce the same hash location are called
A. Synonyms
B. Collision
C. Clustering

16.) Radix Sort makes use of which of the following container classes?
A. Stack
B. Queue
C. Dequeue
D. Heap
E. Binary search tree

17.) A bucket (in hashing) is
A. a container for water
B. collection of synonyms
C. clusters

18.) Quick sort is always quick
A. True
B. False

19.) Merge sort requires extra space
A. True
B. False

20.) Which is true?
A. O(1)
B. O(logN)
C.O(N)
D. O(N*N)

Reference no: EM13930259

Questions Cloud

Profitable business operating within an attractive market : The Steel Tube division was a profitable business operating within an attractive market. The investment, which employed new technology, had recently been identified as part of the group's core activities.
Name and describe the two categories of internal controls : What is the purpose of internal controls?
Conduct a survey of your fellow colleagues to gauge : Question 1: You have been asked to conduct a survey of your fellow colleagues to gauge their use of social media at the work place. Explain the following:
What procedures could be put into place to prevent : What do you suppose caused the discrepancy between the actual count and the count that Rhonda had supplied?
Describe the base case of a recursive algorithm : Which of the following statements could describe the base case of a recursive algorithm? You are using a language that does not support recursion. What data structure would you use to traverse a binary search tree in order
Classifications and descriptions information to enter record : Use the Job classifications and descriptions information to enter records into the Job Title table for the following titles:
Adjusting entry for the nsf check and the subsequent entry : Record in general journal form the adjusting entry for the NSF check and the subsequent entry for redemption of the check by the customer.
Message on the recorded answering machine : At 4.30pm on Monday, Alex reads Michael's acceptance and immediately telephones Joshua's business address, leaving a message on the recorded answering machine: "Ignore the letter you will receive-deal off. Alex."
Polar coordinate system and rectangular coordinate : The rectangular coordinates of a point in the x-y plane are (??,??)=(2.75, -6.10). Draw this point and label the axes and the point appropriately. Then find the polar coordinates of this point. Convert (??,??)=(8.44mm, 23°) to Cartesian coordinat..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd