Mena Sargios
Quiz von , erstellt am more than 1 year ago

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU

205
0
0
Mena Sargios
Erstellt von Mena Sargios vor mehr als 7 Jahre
Schließen

1. Trees Splay Trees

Frage 1 von 20

1

Splay trees use AVL rotation by taking nodes that not have been accessed and move them toward the leaves.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 2 von 20

1

What is a splay tree and what is the act of splaying?

Wähle eine der folgenden:

  • 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

Erklärung

Frage 3 von 20

1

What is the Big O for average case of Reterieval for Splay trees?

Wähle eine der folgenden:

  • log(N)

  • O(N^2)

Erklärung

Frage 4 von 20

1

What is the benefit of using splay trees?

Wähle eine der folgenden:

  • it allows easier access to recently added values.

  • none of the above

Erklärung

Frage 5 von 20

1

Splaying is used for balancing binary search trees.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 6 von 20

1

What is the worst case to search a Splay tree?

Wähle eine der folgenden:

  • A.n

  • B.amortized O(log n)

  • C.n^2

  • D.none of these

Erklärung

Frage 7 von 20

1

How are splay trees different from AVL trees?

Wähle eine der folgenden:

  • Splay trees splay the node visited all the way to the root to make them more easily accessed.

  • none of the above

Erklärung

Frage 8 von 20

1

A splay tree is a type of balanced binary search tree.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 9 von 20

1

what do you trying to splay a node with the root(zig)?

Wähle eine der folgenden:

  • A) Avl single rotation

  • B) Avl double rotation

Erklärung

Frage 10 von 20

1

Which of the following is a disadvantage of a splay tree?

Wähle eine der folgenden:

  • 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

Erklärung

Frage 11 von 20

1

What is a binary search tree with the additional property that recently
accessed elements are quick to access again called?

Wähle eine der folgenden:

  • A) B-Tree

  • B) Spray Tree

  • C) AVL Tree

  • D) Splay Tree

Erklärung

Frage 12 von 20

1

What algorithm do you need to use to create a minimum spanning tree?

Wähle eine der folgenden:

  • Prim’s Algorithm

  • none of the above

Erklärung

Frage 13 von 20

1

What is a splay tree?

Wähle eine der folgenden:

  • A. A tree with no leaves

  • B. A tree with two root nodes

  • C. A self-adjusting binary search tree

  • D. An empty tree

Erklärung

Frage 14 von 20

1

What is a splay tree?

Wähle eine der folgenden:

  • A) A self-adjusting binary search tree.

  • B) A tree that spreads out

  • C) there is no such thing

Erklärung

Frage 15 von 20

1

What is a condition for a zig-zag step?

Wähle eine der folgenden:

  • 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)

Erklärung

Frage 16 von 20

1

What are splay trees?

Wähle eine der folgenden:

  • 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

Erklärung

Frage 17 von 20

1

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.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 18 von 20

1

In average case, what is the efficiency of Deletion of an AVL tree?

Wähle eine der folgenden:

  • A. logn

  • B. nlogn

  • C. n

  • D. n2

Erklärung

Frage 19 von 20

1

Splay trees are NOT self adjusting Binary Search Trees.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 20 von 20

1

What is splaying?

Wähle eine der folgenden:

  • Moving the last accessed node in a tree to the root with AVL rotations.

  • none of the above

Erklärung