Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 14 (1 point) In ______, the left and right subtrees of any node have he

ID: 3765405 • Letter: Q

Question

Question 14 (1 point)

In ______, the left and right subtrees of any node have heights that differ by at most 1.

Question 14 options:

all trees

all binary tress

n-ary trees

balanced binary trees

Save

Question 15 (1 point)

Which of the following is NOT a property of a complete binary tree of height h?

Question 15 options:

all nodes at level h – 2 and above have two children each

when a node at level h – 1 has children, all nodes to its left at the same level have two children each

when a node at level h – 1 has one child, it is a left child

all leaves are at level h

Save

Question 16 (1 point)

The traversal of a binary tree is ______.

Question 16 options:

O(n)

O(1)

O(n2)

O(log2n)

Save

Question 17 (1 point)

The ______ defines the visit function that is an argument in the following function header: void inorder(TreeNode *treePtr, FunctionType visit);

Question 17 options:

binary tree header file

tree node class

friend class of the binary tree

client

Save

Question 18 (1 point)

In an array based representation of a complete binary tree, which of the following represents the left child of node tree[i]?

Question 18 options:

tree[i+2]

tree[i–2]

tree[2*i+1]

tree[2*i+2]

Save

Question 19 (1 point)

The maximum number of comparisons for a retrieval operation in a binary search tree is the ______.

Question 19 options:

length of the tree

height of the tree

number of nodes in the tree

number of leaves in the tree

Save

Question 20 (1 point)

The maximum height of a binary tree of n nodes is ______.

Question 20 options:

n

n / 2

(n / 2) – 2

log2(n + 1)

Save

Question 21 (1 point)

The minimum height of a binary tree of n nodes is ______.

Question 21 options:

n

n / 2

(n / 2) – 2

log2(n + 1)

Save

Question 22 (1 point)

Locating a particular item in a binary search tree of n nodes requires at most ______ comparisons.

Question 22 options:

n

n / 2

(n / 2) – 2

log2(n + 1)

Save

Question 23 (1 point)

Locating a particular item in a balanced binary search tree of n nodes requires at most ______ comparisons.

Question 23 options:

n

n / 2

(n / 2) – 2

log2(n + 1)

Save

Question 24 (1 point)

A full binary tree whose height is 4 has ______ nodes.

Question 24 options:

7

8

15

31

Save

Question 25 (1 point)

Question 25 options:

1, 2, 3, 4, 5, 6, 7, 8, 9

6, 2, 1, 4, 3, 5, 8, 7, 9

6, 2, 8, 1, 4, 7, 9, 3, 5

1, 3, 5, 4, 2, 7, 9, 8, 6

Save

Question 26 (1 point)

Each node in a binary tree has ______.

Question 26 options:

exactly one child

at most one child

exactly two children

at most two children

Save

Question 27 (1 point)

An inorder traversal visits a node before it traverses either of the node's subtrees.

Question 27 options:

Save

Question 28 (1 point)

The height of a binary search tree is sensitive to the order in which items are inserted into the tree.

Question 28 options:

Save

Question 29 (1 point)

A balanced binary search tree has the minimum height possible for the tree.

Question 29 options:

Save

all trees

all binary tress

n-ary trees

balanced binary trees

Explanation / Answer

  
14)
d: balanced binary trees
15)
d: all leaves are at level h
16)
a: O(n)
17)
b: tree node class
18)
c: tree[2*i+1]
19)
b: height of the tree
20)
a: n
21)
d: log2(n + 1)
22)
c: n
23)
d: log2(n + 1)
24)
c: 15 (1+2+4+8 = 15)
25)
not able to see picture
26)
d: at most two children
27)
b: False (it traverses left child of node before the perticular node)
28)
a: True
29)
b: False (since all balanced binery search trees are not full binery trees, full binery tree will have the least height possible)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote