0% found this document useful (0 votes)
67 views3 pages

Mod 4 and 5 QB

This document covers various topics related to trees and sorting algorithms: 1. It discusses different types of binary trees like binary, complete binary trees and their properties. It also covers tree traversal algorithms like preorder, postorder. 2. It includes algorithms for operations on binary search trees like insertion, searching, finding the maximum element. Data structures like threaded binary trees and their properties are explained. 3. Sorting algorithms like bubble sort and insertion sort are covered along with their implementation. Hashing techniques like separate chaining and linear probing for handling collisions are also discussed.

Uploaded by

Vaibhav Ravindra
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)
67 views3 pages

Mod 4 and 5 QB

This document covers various topics related to trees and sorting algorithms: 1. It discusses different types of binary trees like binary, complete binary trees and their properties. It also covers tree traversal algorithms like preorder, postorder. 2. It includes algorithms for operations on binary search trees like insertion, searching, finding the maximum element. Data structures like threaded binary trees and their properties are explained. 3. Sorting algorithms like bubble sort and insertion sort are covered along with their implementation. Hashing techniques like separate chaining and linear probing for handling collisions are also discussed.

Uploaded by

Vaibhav Ravindra
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

MODULE 4

1. What is a tree? With a suitable example define


L2
i) Binary tree ii) level of a binary tree iii) complete binary tree
2. Write the routines to traverse the given tree using
L3
i) Pre-order traversal ii) post-order traversal
3. What is binary search tree? Write an algorithm to implement for recursive
L3
search or iterative search for a binary search tree.
4. Write the routines for
L3
i) Create a binary tree ii) testing for equality of binary trees.
5. Write an expression tree for the following postfix expression
L2
Ab + cd - * ef + /
6. Write a c-function to insert an item into a binary tree based on direction.

L3

7. Write a function to
i) Find the maximum element in the binary search tree L3
ii) To search an element in the tree
8. Explain the following
i) binary search tree L2
ii) threaded binary tree
iii) strictly binary tree
iv) almost complete binary tree
9. Write a c routine to count the number of nodes in a binary search tree. L3

10. Explain array representation of binary tree and write a function to search a
L2
given element in a binary search tree using array representation.
11. Show the array representation and linked representation for the following
L2
binary tree
12. Write an expression tree for expression A/B*C*D+E. give the c function
for inorder ,preorder and post order traversals and apply the traversal L3
methods to the expression tree and give the result of traversals.
13. Draw the binary search tree for the input: L3
14 15 4 9 7 18 3 5 16 4 20 17 9
Give recursive search function to search an element in that tree
14. For any non-empty binary tree T ,if n0 is the number of leaf nodes and n2
L2
the number of nodes of degree 2 then prove that n0=n2+1
15. What is the advantage of threaded binary tree over binary tree? Explain
L3
threaded binary construction with a suitable example.
16. Write short notes on:
L2
a)binary trees b) BST trees
17. Inspect and draw a binary tree for the following Expression 3+4*(7-6)/4+3.
L3
Traverse the above generated tree using Inorder, Postorder, Preorder.
18. Describe any five applications of trees. L2

19. Apply binary search tree for the given data and show the linked list
L3
representation of the same:100,85,45,55,110,20,70,65.
20. What is threaded binary tree? Explain the right and left sub tree in threaded
L2
binary tree
21. Write a c routine to check the equality of the binary tree L3

22. Write the c routine to traversal a given tree using preorder and post order
L3
traversal

MODULE 5

1. Write an algorithm for bubble sort. Trace the algorithm for the data:
L3
30,20 ,10 ,40, 80,60 ,70
2. Explain open addressing & chaining used to handle overflows in hashing. L2

3. Explain the directory less dynamic hashing. L2

4. Explain with example radix sort L2

5. Explain open addressing & chaining used to handle overflows in hashing.


L2

6. Assuming the values {2341,4234,2839,430,22,397,3920}, a hash table of


size 7, and hash function h(x)=x mod 7, Examine the resulting tables after
inserting the values in the given order with each of these collision L3
strategies.
i)Separate chaining ii)Linear Probing iii)Quadratic probing
7. Develop a C function for insertion sort .Organize the following list using
L3
insertion sort:50,30,10,70,40,20,60
8. Explain how open addressing and chaining used to handle overflow in
L2
hashing
9. Write a ‘C’ function to sort a given array using Insertion sort. L3
Construct the AVL Tree given the list of elements
S={ INDIGO, GREEN, CYAN, YELLOW, RED, ORANGE, L3
VOIOLET ,PINK} and DELETE YELLOW,RED ?
11. Write about AVL Tree applications? L2

12. (a) Insert the following sequence of elements into an AVL tree, starting
with an empty tree: 10, 20, 15, 25, 30, 16, 18, 19. L3
(b) Delete 30 in the AVL tree that you got.
13. Explain Hashing Techniques in detail with examples? L2

14. Define Hashing and Write about different Hashing functions? L2

15. Explain the Operation that can be performed on AVL trees L2

16. Construct an B+ tree by inserting the elements the elements


L3
MAR,MAY,NOV,AUG,APRIL,JAN,DEC,JULY,FEB,JUNE,OCT,SEPT.

You might also like