Given the array of numbers, show the elements of the array after each iteration of heapify operation.

CS 3304 Data and Information Structures

Submission: Submit your solutions as a single .pdf file through Blackboard. .pdf file will contain
your solutions for all questions. If you scan your handwritten solutions, be sure that your
handwriting is legible.
Q1 (20 pts). Given the array of numbers, show the elements of the array after each iteration of
selection sort, bubble sort, and insertion sort. The algorithms will sort the array in increasing
order.
x[1] x[2] x[3] x[4] x[5] x[6]
6 4 10 1 9 3
For instance, after the first iteration of the bubble sort, the array will have the following
elements:
x[1] x[2] x[3] x[4] x[5] x[6]
4 6 10 1 9 3
Q2 (15 pts). Given the array of numbers, show the elements of the array after each iteration of
heapify operation.
x[1] x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9] x[10]
4 6 3 9 1 5 14 12 8 10
Q3 (20 pts). Given an empty heap, show the heap after each insertion/deletion given below:
Insert 15
Insert 11
Insert 6
Insert 13
Insert 19
Insert 4
Insert 7
Insert 17
Insert 16
Insert 2
Delete 19
Delete 17

Q4 (10 pts). Using the hash function H(x) = 3*x (mod 13), and linear probing, show the hash
table that results when the following integers are inserted in the order given:
26, 42, 5, 44, 92, 38, 40, 45, 11, 60, 80, 31.
Q5 (20 pts). Given the following binary search tree (BST), show the BST after each
insertion/deletion given below:
Insert 64
Insert 75
Insert 25
Insert 48
Insert 27
Delete 65
Delete 32
Delete 41
Delete 29
Q6 (15 pts). Given the following binary tree, show the order of the elements if
a. Inorder traversal is performed.
b. Preorder traversal is performed.
c. Postorder traversal is performed