Which are binary search trees

Assignment Help Computer Engineering
Reference no: EM132117111

QUESTION 1

If both of the child references of a binary tree node are non-null, it follows that the node must be ____.

a root node

a leaf node

a child node

an interior node

QUESTION 2

Which of the following statements about binary trees is correct?

Each node in a binary tree has at least two child nodes.

Each node in a binary tree has at most two child nodes.

The number of child nodes for each node in a binary tree is any power of two.

If divided down the middle from top to bottom, a binary tree must be symmetrical.

QUESTION 3

Consider the following tree diagram:

Which of the following nodes are leaf nodes?

C

B

H

B and H

QUESTION 4

Consider the following tree diagram:

Which of the following nodes are parent nodes?

C

C and R

R and D

C, R, and D

QUESTION 5

Consider the following binary search tree diagram:

Which of the following trees represents the correct result after inserting element T?

I

II

III

IV

QUESTION 6

Consider the following tree diagram:

What is the height of this tree?

3

4

5

7

QUESTION 7

What does the left node reference of a newly inserted binary search tree node get set to?

depends where the node is inserted

it gets set to the left child of the new node, if one exists

always null

it gets set to the left child of the root, if it exists

QUESTION 8

What are the differences between preorder, postorder, and inorder traversals?

The order in which we visit the left and right subtrees

Preorder only visits the left subtree

Postorder only visits the right subtree

The order of the root visit

QUESTION 9

Consider the following tree diagrams:

Which of the above are binary search trees?

I

II

I and II

Neither I nor II

QUESTION 10

Consider the following tree diagram:

What is the height of this tree?

3

4

6

7

QUESTION 11

Consider the following tree diagram:

Which of the following statements is NOT correct?

Nodes D and K form a subtree

Nodes H, M, and X form a subtree

Nodes R and N form a subtree

Nodes L and T form a subtree

QUESTION 12

Consider the following tree diagrams:

Which are binary search trees?

I

II

I and II

Neither I nor II

QUESTION 13

Consider the following binary search tree diagram:

Which nodes will be visited in order to insert the letter B into this tree?

H

H and D

H, D, and F

H, D, and A

QUESTION 14

If the child references of a binary tree node are both null, the node is ____.

a root node

a leaf node

a parent node

an interior node

QUESTION 15

Consider the following tree diagrams:

Which of these trees is considered to be balanced?

I

I and II

II and III

I and III

QUESTION 16

Consider the following tree diagrams:

Which of these trees is considered to be unbalanced?

I

II

III

II and III

QUESTION 17

Consider the following tree diagrams:

Which of the above are binary trees?

I

II

I and II

Neither I nor II

QUESTION 18

Consider the following tree diagram:

Which of the following statements is NOT correct?

R is an ancestor of N

C is an ancestor of N

D is an ancestor of P

H is an ancestor of M

QUESTION 19

Consider the following tree diagram:

Which of the following nodes are siblings?

D and U

H and M

D and B

L and T

QUESTION 20

Which action(s) will invalidate a min-heap so that, it may no longer have the properties of a min-heap?

I change the value of the root node

II remove the lowest level, right-most node

III remove the lowest level, left-most node

III

I and II

II and III

I and III

Reference no: EM132117111

Questions Cloud

How much are his monthly payments expected to be : William just graduated Indiana University but had to take out a $50,000 student loan. His loan requires him to make monthly payments over a 10-year period at 4.
How much must you invest in your account today : How much must you invest in your account today if you want to pay yourself $230 at the end of each of the next 15 years?
How much will you have saved : If instead of investing in the account, you saved your money in your cookie jar. How much will you have saved?
Annual management fee : You manage a hedge fund with $400 million in assets. Your fee structure provides for a 1% annual management fee with a 20% incentive
Which are binary search trees : Consider the following tree diagram: Which of the following statements is NOT correct?Which of these trees is considered to be balanced?
What is the operating cash flow : That is, the depreciation each year will be $128190/14. Assuming a tax rate of 26%, what is the operating cash flow?
Compensating balance versus discount loan : Weathers Catering Supply, Inc., needs to borrow $150,000 for 6 months. State Bank has offered to lend the funds at a 9% annual rate
What is the project npv if the tax rate : The annual operating cash flow is $70132 and the cost of capital is 5% What is the project's NPV if the tax rate is 30%?
How innovation has affected organisations management : Discuss the major sub-types of your innovation or the area of this innovation you are going to focus on (eg mobile commerce within technological innovation

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the heat-exchanger theory

Computer analysis of Prob. with to=f(x) and constant fluid properties: Calculate the flow, starting with inital conditions of flat velocity and temperature.

  Complete red-black insertion by writing the missing function

Complete red-black insertion by writing the following missing functions: modify_right, flip_color, rotate_left, rotate_right and double_rotate_left.

  Explain different types of congestion in network layer

Explain different types of congestion in network layer?

  What researchers were surprised to discover with dll file

Write a three to four page paper in which you: Identify what researchers were surprised to discover with Stuxnet's malicious DLL file.

  Draw the four entities that belong on this data model

Draw the four entities that belong on this data model. Provide some basic attributes for each entity, and select an identifier, if possible. Draw the appropriate relationships between the entities and label them.

  Describe the behavior of the data

Methods are the members of a class that describe the behavior of the data. The Main( ) method is required for both console and Windows applications.

  How many rounds the player has won

If the player rolls a total of 7 or 11 in the first round, the player wins. If the player rolls a total of 2, 3, or 12 in the first round, the player loses.

  Explain principles of digital analysis

Explain Principles of digital analysis discussion. When creating forensic images, verifying an image's integrity (i.e., whether or not it is an exact bit-for-bit copy of the original evidence) is very important.

  Prepare a set of nonfunctional requirements

Prepare a set of nonfunctional requirements, including operational requirements, performance requirements, security requirements, and cultural and political requirements. Much information is incomplete, but do your best.

  What can you find out regarding the cryptosystems and

1. go to a popular online electronic commerce site like amazon.com. places several items in your shopping cart and

  Create developers own machines yet not have direct access

Describe the steps you should take so that developers can create and manage their own machines yet not have direct access to the Hyper-V hosts.

  Implement a fast 16-bit cmos adder

EECS 170D Project. Your task is to implement a fast 16-bit CMOS adder. You can implement any kind of adder EXCEPT for a standard static ripple adder. So, for example, you can implement a carry-skip or carry look-ahead adder, Laner-Fischer, Brent-K..

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