Quiz Balanced Trees - 2-3 trees

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Check ALL statements that are true -Most but not all 2-3 trees are perfectly balanced -2-3 trees allow for 2-nodes as well as 3 nodes -Every path from the root to a leave has the same length -2-3 trees are an implementation of balanced trees in guaranteed logarithmic time -2-3 trees are generalizations of the binary search trees (BSTs)

-2-3 trees allow for 2-nodes as well as 3 nodes -Every path from the root to a leave has the same length -2-3 trees are an implementation of balanced trees in guaranteed logarithmic time -2-3 trees are generalizations of the binary search trees (BSTs)

Check ALL statements that apply to a 3-node in a 2-3 tree. -All keys in the middle subtree are bigger than the bigger key and smaller than the smaller key -All keys in the middle subtree are bigger than the smaller key and smaller than the bigger key -All keys in the left subtree are smaller than the smaller key -All keys in the right subtree are bigger than the bigger key

-All keys in the middle subtree are bigger than the smaller key and smaller than the bigger key -All keys in the left subtree are smaller than the smaller key -All keys in the right subtree are bigger than the bigger key

2 nodes have ________ key(s) and ________ children (subtrees) 3-nodes have ________ key(s) and ________ children (subtrees)

1 2 2 3

Assume you have a 2-3 tree, that contains N elements (N keys) Which big-O best describes the splitting of a temporary 4-node

O( log N )

Which of the following causes the height of a 2-3 tree to increase? -Adding a new node to a leave -Inserting a new element into a 3-node -Splitting a temporary 4-node at the root.

Splitting a temporary 4-node at the root.

Complete the sentence below: A(n) __________ traversal of the a 2-3 tree yields the keys in ascending order

in-order


Set pelajaran terkait

Quiz: Chapter 15 Critical Thinking in Nursing Practice

View Set

Unit VIII: Oncological and Hematological Problems of the Adult Client

View Set

Song. Hello, hello, hello! How are you!

View Set

Ch 6 Quiz Organizing and Outlining

View Set

PSY 100 Final CSU Professor Lundeberg

View Set