0% found this document useful (0 votes)
3 views

1 assign

The document outlines an assignment consisting of various questions related to data structures and algorithms, including topics such as binary trees, heaps, recursion vs iteration, and hashing. It requires students to perform tasks like constructing trees, traversing them, and applying algorithms. Additionally, it includes theoretical questions that differentiate between various data structures and techniques.

Uploaded by

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

1 assign

The document outlines an assignment consisting of various questions related to data structures and algorithms, including topics such as binary trees, heaps, recursion vs iteration, and hashing. It requires students to perform tasks like constructing trees, traversing them, and applying algorithms. Additionally, it includes theoretical questions that differentiate between various data structures and techniques.

Uploaded by

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

DSA Assignment #1A

CLO_1 PLO_2: Problem Analysis C2 (Understanding)


Solve all questions (Marks 3)

1. Differentiate between Min and Max heap Binary Tree. Illustrate with example.

2. Take the following input arrays


A = [10 20 25 6 12 15 4 16]
B= [15 20 7 9 30]
Construct a Binary Tree from the Arrays A and B

3. Heapify the BT for A and B in above problem as Max and Min heap

4. Insert 30 in the following tree:

5. Consider the max heap 50, 30, 20, 15, 10, 8, 16. Delete a node with value 50.

6. Differentiate between Recursion and Iteration, highlighting the pros and cons of each approach.
Illustrate with the help of examples.

7. State the rules to solve the problem of Tower of Hanoi. Why recursive approach is used to solve
the problem?

8. Compare linked list with an array.

9. Describe a Tree and define the following:


Root Node Child Node Parent Node Sub Tree Leaf Node

10. What is a binary Tree? Compare a full binary Tree with perfect binary tree.

11. Perform the In order, Pre order and Post order traversal of the following trees:
12. Construct a Binary Search Tree by inserting the following sequence of numbers:
10,12,5,4,20,8,7,15 and 13

13. Differentiate between Depth of a node X in a tree structure with the width of the node X in the
same tree.

14. Differentiate between DFS and BFS algorithms for the traversal.
15. Apply the Depth First Search Algorithm (or Breadth First Algorithm) to traverse the following
Graphs.
16. Describe Hashing with example. Advantages of Hashing. Name different types of Hashing used.
Name and explain different Hashing collision resolution techniques with examples.

17. Assume the following array contains the key-values inside a Hash table of size m=10.
The Hash function used is h(k) = 2k + 3.
A = [3 2 9 6 11 13 7 12] Key values
Construct a Hash Table using Linear Probing technique.

18. Consider the following frequency table for the characters:


Character Frequency
a 5
b 9
c 12
d 13
e 16
f 45
Construct a Huffman Tree and assign codes to the characters in above table.

You might also like