For a tree T, let LR(T) be no of nodes which are the only children of their parent and n be total… 1 answer below »

Even the smartest students need writing assistance at some point during their academic career. Should you lock yourself in a room and spend the entire weekend trying to write a paper? We promise you that the paper that you pay for won’t be resold or submitted elsewhere. It will also be written according to the instructions that you and your professor provide. Our excellent essays stand out among the rest for a reason. Don’t just take our word, check them out by yourself.


Order a Similar Paper Order a Different Paper

. For an tree T, let LR(T) be no of nodes which are the only children of their

parent and n be total no of nodes in the tree. We define LT(T) = LR(T)/n

. Which of the following statements are true ?

(a) For any non empty AVL tree T, LT(T) =

1

2

(b) For any binary tree T, if LT(T) =

1

2

then height(T) = O(log(n))

(c) For any binary tree T, if there are ?(n) nodes which are the only children

of their parents, all of which are leaves, then height(T) = O(log(n))

(d) None of these

1

2. How many distinct Max Heap can be made from 5, 6, 7 distinct integers

respectively ?

(a) 8, 20, 80

(b) 8, 20, 76

(c) 8, 18, 80

(d) 7, 18, 76

3. Select the correct statements.

(a) A node u is an proper ancestor of a node v if v is contained in the

subtree rooted at u.

(b) The depth of a node is the number of edges in the unique path from

the root to the node.

(c) The height of a node is the length of the longest path from node to a

leaf.

(d) A full binary tree is a tree in which every node other than the leaves

has two children

4. For a 2-3 tree in which 10 unique values are inserted, find the maximum and

the minimum number of splits that may happen during insertions .

5. Starting with an empty AVL tree, following operations were performed on

the tree: Inserting elements : 10.20.15,25,30,16,18,19 followed by deleting 30

from the tree. Answer the question with the root of the resultant tree and

the leaves in increasing order.

6. Select the correct statements.

(a) Given two heaps with n elements each, it is possible to construct a single

heap comprising all 2n elements in O(n) time.

(b) Building a heap with n elements can be done in O(n) time.

(c) Maximum element in min heap can always be found in O(logn) time.

(d) In a heap of depth d, there must be at least 2d

elements. (Assume depth

of root is zero)

7. A priority queue can be implemented as a heap because: (Priority Queue is

an extension of queue with every item has a priority associated with it and

always element with high priority is dequeued before an element with low

priority.)

Attachments:

Writerbay.net

Do you need help with this or a different assignment? In a world where academic success does not come without efforts, we do our best to provide the most proficient and capable essay writing service. After all, impressing professors shouldn’t be hard, we make that possible. If you decide to make your order on our website, you will get 15 % off your first order. You only need to indicate the discount code GET15.


Order a Similar Paper Order a Different Paper