1. Trees Splay Trees

Descrição

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU
Mena Sargios
Quiz por Mena Sargios, atualizado more than 1 year ago
Mena Sargios
Criado por Mena Sargios mais de 7 anos atrás
205
0

Resumo de Recurso

Questão 1

Questão
Splay trees use AVL rotation by taking nodes that not have been accessed and move them toward the leaves.
Responda
  • True
  • False

Questão 2

Questão
What is a splay tree and what is the act of splaying?
Responda
  • A splay tree is a self-adjusting binary search tree. The act of splaying is that after a node is accessed, it is moved up in the tree toward the root with AVL rotations.
  • none of the above

Questão 3

Questão
What is the Big O for average case of Reterieval for Splay trees?
Responda
  • log(N)
  • O(N^2)

Questão 4

Questão
What is the benefit of using splay trees?
Responda
  • it allows easier access to recently added values.
  • none of the above

Questão 5

Questão
Splaying is used for balancing binary search trees.
Responda
  • True
  • False

Questão 6

Questão
What is the worst case to search a Splay tree?
Responda
  • A.n
  • B.amortized O(log n)
  • C.n^2
  • D.none of these

Questão 7

Questão
How are splay trees different from AVL trees?
Responda
  • Splay trees splay the node visited all the way to the root to make them more easily accessed.
  • none of the above

Questão 8

Questão
A splay tree is a type of balanced binary search tree.
Responda
  • True
  • False

Questão 9

Questão
what do you trying to splay a node with the root(zig)?
Responda
  • A) Avl single rotation
  • B) Avl double rotation

Questão 10

Questão
Which of the following is a disadvantage of a splay tree?
Responda
  • a) Recently accessed items are at the bottom of the tree
  • b) Implementation is very complex
  • c) Splay trees are not very efficient
  • d) The tree height can potentially be n

Questão 11

Questão
What is a binary search tree with the additional property that recently accessed elements are quick to access again called?
Responda
  • A) B-Tree
  • B) Spray Tree
  • C) AVL Tree
  • D) Splay Tree

Questão 12

Questão
What algorithm do you need to use to create a minimum spanning tree?
Responda
  • Prim’s Algorithm
  • none of the above

Questão 13

Questão
What is a splay tree?
Responda
  • A. A tree with no leaves
  • B. A tree with two root nodes
  • C. A self-adjusting binary search tree
  • D. An empty tree

Questão 14

Questão
What is a splay tree?
Responda
  • A) A self-adjusting binary search tree.
  • B) A tree that spreads out
  • C) there is no such thing

Questão 15

Questão
What is a condition for a zig-zag step?
Responda
  • A. X is the right child of P and P is the right child of G
  • B. X is the left child of P and P is the left child of G
  • C. X is the left child of P and P is the right child of G
  • D. zig-zag is done when P is the root (therefore there is no G)

Questão 16

Questão
What are splay trees?
Responda
  • A. self-adjusting binary sort trees
  • B. self-adjusting binary search trees
  • C. self-adjusting binary splay trees
  • D. non self-adjusting binary sort trees

Questão 17

Questão
When dealing with splay trees the condition for the Zig-Zag step is when X is the left child of P, and P is the right child of G, or When X si the right child of P and P is the left child of G.
Responda
  • True
  • False

Questão 18

Questão
In average case, what is the efficiency of Deletion of an AVL tree?
Responda
  • A. logn
  • B. nlogn
  • C. n
  • D. n2

Questão 19

Questão
Splay trees are NOT self adjusting Binary Search Trees.
Responda
  • True
  • False

Questão 20

Questão
What is splaying?
Responda
  • Moving the last accessed node in a tree to the root with AVL rotations.
  • none of the above

Semelhante

2. Red Black Tree
Mena Sargios
12. Graph Traversal
Mena Sargios
5. B-Tree
Mena Sargios
3. 2-3 Tree
Mena Sargios
7. Algorithm Growth Rate
Mena Sargios
16. Greedy Algorithm (Huffman code)
Mena Sargios
4. 2-3-4 Tree
Mena Sargios
10. Hashing Collision
Mena Sargios
14. Graph Shrtest Path
Mena Sargios
15. Graph Spanning Tree
Mena Sargios
6. Algorithm Intro
Mena Sargios