Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1.

Consider the following Key Space:

18, 27, 8, 13, 29, 47, 13

Now, create a hash table using the hash function, h(x) = x%10. Apply Linear Probing to avoid
collisions

2. Consider the following Key Space:

4, 12, 10, 21, 8, 14, 22

Now, create a hash table using the hash function, h(x) = x%10. Apply Quadratic Probing to
avoid collisions

3. Consider the following Key Space:

7, 17, 11, 77

Now, create a hash table using the hash function, h(x) = x%10. Apply Double Hashing to avoid
collisions

4. Consider the following BSTs:

Now, add 7, 11, 3 to the left-skewed BST and add 20, 27, 31 to the right-skewed BST. Show the
proper workflow of each insert operation
5. Consider the following BST:

Now, delete nodes 20, 30 and 38 and illustrate each step of action

6. Consider the following Binary Tree:


Now, traverse the tree using Preorder, Inorder and Postorder traversal methods

7. Consider the following array:

22 10 15 29 3 18 7

Now, sort the given array using heap sort method

8. Consider the following graph:

Traverse the given graph using BFS and DFS technique. Illustrate each step.

9. Consider the following graph:


Now, calculate the number of spanning trees possible for this graph. Also, determine the cost of
the minimum spanning tree.

You might also like