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

I need help with following Questions. 2) What is the height of the tree shown ab

ID: 3780121 • Letter: I

Question

I need help with following Questions.

2)

What is the height of the tree shown above?

3)

How many leaf nodes does the tree shown above have?

4)

Which of the following is the result of a preorder traversal of the tree shown above?

5)

Which of the following is the result of an in-order traversal of the tree shown above?

6)

Which of the following is the result of a postorder traversal of the tree shown above?

7)

8)

What does f(n) = O(g(n)) mean? (Implied for each: as n gets large)

9)

Which of the following is technically true of the following function?

f(n) = 3n2 + 7n + 2

10)

Which of the following common complexity classes is "out of place" in the following list ordered by increasing complexity?

11)

12)

A method is determined to have the following cost function. Which is the BEST complexity class to which the method belongs?

f(n) = 475n + n3/2 + 14

13)

Which sorting algorithm(s) guarantee O(n log n) worst-case time?

This tree is a binary tree, but NOT a binary search tree. 17) 13 6 (8

Explanation / Answer

1) option b is the right one as it contains both binary tree and binary search tree

2) total height is 9

3) there are total five leaf nodes

4) preorder traversal is 9 5 2 1 4 7 12 17 11 6 8 13

5)inorder traversal is 1 2 4 5 7 9 17 6 11 8 12 13

6)postorder transversal is 1 4 2 7 5 6 8 11 17 13 12 9

7)we get 20 as the eval

8)f(n) is an order of g(n)

9) the second option is the right one

10)the option that is out of place is O( log n )

11)0(1)

12)0(n2)

13) mergesort algorithm(s) guarantee O(n log n) worst-case time?

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