Mena Sargios
Test por , creado hace más de 1 año

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

778
0
0
Mena Sargios
Creado por Mena Sargios hace más de 7 años
Cerrar

0. AVL Tree Visualization

Pregunta 1 de 16

1

An AVL tree is an example of a balanced tree.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 2 de 16

1

When the Avl is in a left left case which of these steps should you take
to correct the height of the tree ?

Selecciona una de las siguientes respuestas posibles:

  • A) Right

  • B) left

  • C) Left Right

  • D) Rgiht left

Explicación

Pregunta 3 de 16

1

Why is a balance condition imporant in binary search trees like AVL?

Selecciona una de las siguientes respuestas posibles:

  • It ensures that the depth of the tree is O(logN)

  • none of the above

Explicación

Pregunta 4 de 16

1

What is a "balanced" binary tree?

Selecciona una de las siguientes respuestas posibles:

  • A) A tree whose leaves are all on the same depth

  • B) A complete and full tree

  • C) A tree whose left and right subtrees differ by at most 1 in depth

  • D) A binary tree cannot be balanced

Explicación

Pregunta 5 de 16

1

What’s the average case for search? Worst case?

Selecciona una de las siguientes respuestas posibles:

  • O(log n); O(log n)

  • none of the above

Explicación

Pregunta 6 de 16

1

What is an AVL tree?

Selecciona una de las siguientes respuestas posibles:

  • A) a tree with lots of leaves

  • B) a self balancing binary tree

  • C) there is no such thing

  • D) a tree with the parent being the smallest value

Explicación

Pregunta 7 de 16

1

When inserting into an AVL tree, the first step is to insert a node in its proper place according to BST rules.
After BST insertion however, the tree is not guaranteed to be an AVL tree. What is the next step in the algorithm?

Selecciona una de las siguientes respuestas posibles:

  • A. if the new node is a left leaf, rotate left

  • B. update the height and determine the balance of the tree recursively

  • C. if the new node is a right leaf, rotate right

  • D. deconstruct the tree and build it again from scratch

Explicación

Pregunta 8 de 16

1

What makes AVL trees different from Binary Search Trees?

Selecciona una de las siguientes respuestas posibles:

  • In an AVL tree every node in the tree, the height of the left and right subtrees can differ by at most one.

  • none of the above

Explicación

Pregunta 9 de 16

1

What is an AVL tree visualization?

Selecciona una de las siguientes respuestas posibles:

  • A. an AVL tree is a self-balancing binary search tree.

  • B. an AVL tree is a non-balancing binary search tree.

  • C. an AVL tree is a back-balancing binary search tree.

  • D. an AVL tree is a front-balancing binary search tree.

Explicación

Pregunta 10 de 16

1

An Adelson-Velskii Landis (AVL) tree is a self-balancing Binary Search Tree(BST) that maintains it's height to be O(log N) when having N vertices in the AVL tree.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 11 de 16

1

When rotating an AVL tree which of the following are a case where you would need to rotate?

Selecciona una de las siguientes respuestas posibles:

  • A. left,left

  • B. left,right

  • C. right,right

  • D. right,left

  • E. All of the above

Explicación

Pregunta 12 de 16

1

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

Selecciona una de las siguientes respuestas posibles:

  • A. logn

  • B. nlogn

  • C. n

  • D. n2

Explicación

Pregunta 13 de 16

1

What do AVL trees do?

Selecciona una de las siguientes respuestas posibles:

  • They automatically readjust to keep the tree more balanced with a
    lower height. This reduces the worst-case scenario of searching.

  • none of the above

Explicación

Pregunta 14 de 16

1

What is the worst case possible height of AVL tree?

Selecciona una de las siguientes respuestas posibles:

  • A.n

  • B.n^2

  • C.1.44 log n

  • D.n+2

Explicación

Pregunta 15 de 16

1

What is the term for AVL tree balancing?

Selecciona una de las siguientes respuestas posibles:

  • zig-zag

  • none of the above

Explicación

Pregunta 16 de 16

1

What is the biggest height difference an AVL tree can have without rotating?

Selecciona una de las siguientes respuestas posibles:

  • At most the difference can be a height of 1.

  • none of the above

Explicación