Exam 4: Loops

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Given the following heap, show the resulting heap after removing 62 from the heap. Given the following heap, show the resulting heap after removing 62 from the heap.

Free
(Short Answer)
4.8/5
(40)
Correct Answer:
Verified

Add the elements 40, 135, 9, 11, 3, 102, into a heap in this order. Draw the final heap.

Free
(Short Answer)
4.9/5
(31)
Correct Answer:
Verified

Show the BST after inserting 45, 43, 100, 34, 23, and 3 into an empty BST.

Free
(Short Answer)
4.8/5
(35)
Correct Answer:
Verified

Show the balance factor of each node in the following tree. Show the balance factor of each node in the following tree.

(Short Answer)
4.8/5
(40)

a.Suppose you need to store a list of elements, if the number of elements in the program is fixed, what data structure should you use? (array, ArrayList, or LinkedList) b.If you have to add or delete the elements at the beginning of a list, should you use ArrayList or LinkedList? c.If most of operations on a list involve retrieving an element at a given index, should you use ArrayList or LinkedList?

(Short Answer)
4.8/5
(37)

For the AVL tree in the preceding figure, show the new AVL tree after adding element 50. Which node was unbalanced? What rotation did you perform in order to rebalance the tree?

(Short Answer)
4.9/5
(37)

Show the BST after deleting 15 from the following BST. Show the BST after deleting 15 from the following BST.

(Short Answer)
4.9/5
(36)

Assume the load factor threshold is 75%. Show the hash table of size 11 after inserting entries with keys 14, 3, 24, 35, using separate chaining. Show the hash table after removing 24.

(Short Answer)
4.9/5
(27)

Show the inorder, preorder, and postorder of the following BST. Show the inorder, preorder, and postorder of the following BST.

(Short Answer)
4.9/5
(38)

Show the BST after deleting 60 from the following BST. Show the BST after deleting 60 from the following BST.

(Short Answer)
4.8/5
(41)

Suppose that the text consists of characters a, b, c, d, e, f, g, h and frequency of these characters in the text is as follows: a: 30 b: 25 c: 40 d: 9 e: 20 f: 3 g: 12 h: 23 Draw a Huffman tree to obtain the code for these characters.

(Short Answer)
4.8/5
(39)

Assume the load factor threshold is 75%. Show the hash table of size 11 after inserting entries with keys 14, 3, 24, 35, using linear probing. Show the hash table after removing 24.

(Short Answer)
4.8/5
(26)
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)