Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Sequence of key - values ( 5 , 1 6 , 2 2 , 4 5 , 2 , 1 0 , 1

1.
Sequence of key-values (5,16,22,45,2,10,18,30,50,12,1), insert these key-values (in the given order) into the initially empty (2,4) tree, and with respect to the finally obtained (2,4) tree, which of the following descriptions is not true.
A There are 4 nodes in total.
B the root node is the 3-node of 10,22
C the incremental numbers can be obtained by traversing in the middle order.
D The height of the (2,4) tree is 2.
2.
If you input a sequence of sorted data, and it takes O(n log n) time to sort it using merge sort and heap sort, how much time will it take if you use insertion sort? What will be the result if this sorted data sequence is reversed?
A. O(n), O(n^2)
B. O(n log n), O(n^2)
C. O(n), O(n log n)
D. O(n log n), O(n log n)
3.
Which of the following descriptions of Breadth-First Search (BFS) is NOT true?
A It can be used to test whether a graph is connected or not.
B It can calculate whether there are loops in a graph.
C It takes time to visit O(n long n)
D It can calculate the shortest path from the starting point to each vertex.
4.
Consider a tree T storing n data items. If T is a binary search tree, what is the worst-case height of T?
A. n log n
B. n
C. n /2
D. log n
5.
Consider a tree T that stores n data items. If T is a splay tree, what is the worst-case height of T?
A. None of the above
B. n log n
C. log n
D. n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

What research background do you have?

Answered: 1 week ago

Question

=+4. What do you think?

Answered: 1 week ago