SYBCS : Data structures and algorithms 2 : PYQ - BCS Guruji

Ad

Monday, February 27, 2023

SYBCS : Data structures and algorithms 2 : PYQ

 Chapter 1 : Tree

1 mark

Q. Define Heap

Answer:Heap is a data structure which uses tree based data structure where the tree is complete binary tree. 

-Q. Define complete binary tree.

Answer: A complete binary tree is a tree where all the levels of tree have maximum number of possible nodes except the last level.

Q. Define Degree of the tree.

Q. List t tree traversal methods.

Q. Define node of tree.

Answer: Each data element of tree is called as the node of tree.

Q. What is height balance tree?

Answer: Height balance tree is a tree where the height of left subtree is equal to height of right subtree.

Q. The indegree of the root node of a tree is always zero. Justify (T/F).

Q. Define Heap Tree.

Q. Define Topological sort.

-Q. Define AOV Network.

--Q. Define Data Structure.

Q. How many nodes in a tree have no ancestors?

2 mark 

-Q. Define the following terms. i) Height of tree ii) Forest iii) Siblings of tree

Q. List any two applications of tree data structure.

--Q. What is skewed binary tree.

Q. Define the term Right skewed binary tree.

--Q. What are advantages of ADT?

Q. Write the steps for creating BST for the following data 22, 13, 4, 6,25, 23, 20, 18, 7, 27.

Q.  Write the steps for creating a Binary search tree for the following data :  15, 11, 13, 8, 9, 18, 16.

Q.  Write the steps for creating a Binary search tree for the following data : 40,70,60,50,65,20,25

Q. Which data structure is used for bfs.

Q. Explain DFS with example

Programs - 4 mark

Q. Write a program to sort 'n' randomly generated elements using heapsort method.

Q. Write a srecursive C function to insert an element in binary tree.

Q. Write a Recursive ‘C’ function to count total nodes in a BST.

Q. Write a ‘C’ function to compare two BST.

Q. Write a non-recursive ‘C’ function to insert an element in a Binary Search Tree.

 Chapter 2: Efficient Search Trees

1 mark

--Q. Define balance factor

-Q. Define Spanning tree.

4 mark 

Q. Construct an AVL tree for the following data. 70, 50, 30, 90, 80, 130, 120.

Q. Construct an AVL tree for the following data :55, 40, 25, 100, 80, 200, 150

Q. Construct the AVL tree for the following data : SUN, FRI, MON, WED, TUE, THUR, SAT.

Q. Construct the AVL Tree for the following data Chaitra, Magh, Vaishakh, Kartik, Falgun, and Aashadh.

Q. Construct AVL tree for the following data. Pen, Eraser, Book, Scale, Sketchpen, Crayon, Colorpencil.

Q. Construct AVL tree for the following data. NFD ZIM IND AVS NEL ENG SRL PAK

Programs - 4 mark

Q. Write a function to search an element in binary search tree.

 Chapter 3: Graph

1 mark

---Q. Define critical path.

Q. Define acyclic grpah.

Q. Define Multigraph.

Q. List any methods of representing graphs.

-Q. Define complete graph.

Q. What is weighted graph.

Q. Q. Define in-degree & out-degree of vertex.

Q. Define Degree of the tree.

Q. State any two applications of graph.

2 mark

Q. Define i) Degree of vertex ii) Subgraph

Programs - 4 mark

Q.Q. Write a C function to traverse a graph using BFS.

Q. Write the algorithm for BFS traversal of graph.

Q. Write a program that accepts the vertices and edges of graph and store it as an adjacency matrix. Display adjacency matrix.

 Chapter 4: Hash Table

1 mark

Q. Define Bucket.

Q. What do you mean by rehashing.

2 mark

Q. Write any two properties of hash function

No comments:

Post a Comment