0% found this document useful (0 votes)
54 views2 pages

Assignment 2

Uploaded by

ummek2919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views2 pages

Assignment 2

Uploaded by

ummek2919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment questions

1. Explain open addressing and chaining used to handle overflows in hashing.


2. What is collision? What are the methods to resolve collision? Explain linear probing with an
example.
3. Write a short note on hashing-Explain any 3 popular HASH functions.
4. Find the 2 - digit hash address of each number using (Appeared in June/July 2019)- 8 Marks
i) The division method with =97 .
ii) The midsquare method.
iii) The folding method without reversing
iv) The folding method with reversing.

5. Write a short note on optimal binary search tree.


6. Explain in detail about static and dynamic hashing.
7. What is priority queues ? explain Single and Double- ended priority queues
8. Define Binary Search tree. Construct a binary search tree (BST) for the following elements:
100, 85, 45, 55, 120, 20, 70, 90, 115, 65, 130, 145.
9. Traverse using in-order, pre-order, and post-order traversal techniques.
10. Write recursive C functions for the same
11. Define selection tree. Construct min winner tree for the runs of a game given below. Each
run consists of values of players. Find the first 5winners.

12. Construct a binary tree from the Post-order and In-order sequence given below
In-order: GDHBAEICF
Post-order: GHDBIEFCA

13. Design an algorithm to traverse a graph using Depth First Search (DFS). Apply DFS for the
graph given below

Define Forest. Transform the given forest into a Binary tree and traverse using inorder, preorder and
postorder traversal.
Define the Disjoint set. Consider the tree created by the weighted union function on the sequence of
unions: union(0,1), union(2,3), union(4,5), union(6,7), union(0,2), union(4,6), and union(0,4). Process
the simple find and collapsing find on eight finds and compare which find is efficient

Define the Threaded binary tree. Construct Threaded binary for the following elements:

A, B, C, D, E, F, G, H, I

Define Binary tree. Explain the representation of a binary tree with a suitable example.

Write recursive C functions for inorder, preorder and postorder traversals of a binary tree. Also, find
all the traversals for the given tree.

You might also like