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

Data Structure Assignment-CSE

Uploaded by

snehucoder18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Data Structure Assignment-CSE

Uploaded by

snehucoder18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Mr.

Shiplu Das
Assistant Professor, CSE
Adamas University Data Structure and Algorithm

ASSIGNMENT-1

Introduction to Data Structure:


1. Define data structure. List the various linear and non-linear data structuresand explain
them in brief.
2. What does abstract data type means? Briefly explain linear and nonlineardata structures.
3. Application of Data Structures.
4. Write different operation of Data Structures.
5. Differentiate the following terms:
(a) Linear and Non-Linear Data Structures
(b) Primitive and Non-Primitive Data Structures
______________________________________________________________

ASSIGNMENT-2

LINEAR DATA STRUCTURE- Stack:


1. What is stack? Explain basic primitive operation of stack with example.
2. What are applications of Stack.
3. Differentiate push () and pop () functions.
4. Write an algorithm of push and pop.
5. Difference between List and Array with example.
6. Write a C program to implement a stack with all necessary overflow andunderflow
checks using array.
7. Explain Difference between FIFO and LIFO.
8. Explain the process of adding and removing an element from a stack.
9. What is prefix, infix and postfix notation with proper example.
10. Convert infix to postfix and infix to postfix with proper example.
11. What is the advantage of Polish expression over infix notation?
12. Convert the given infix expression to postfix and prefix expression using Stack implementation
1. A + B * C ^ D – E
2. A – B / (C * D ^ E)
3. (A + B) * C / D + E ^ F /G
4 . A / (B – C / D ^ E) + F
5) A + [(B +C) + (D + E) * F] / G

13. Evaluate the following expressions.


1) 5 + 4 * 2
2) 4 + 2 * 5 ^ 2 + 9 / 3 – 1 * 8
3) 40 25 + 20 5 * 3 + *
4) 9 + 5 * 7 – 6 ^ 2 + 9 / 3
5) 8 * 2 -1 + 7 * 5
14. Define stack representation using Array and Linked List.
____________________________________________________________________________
Mr. Shiplu Das
Assistant Professor, CSE
Adamas University Data Structure and Algorithm

ASSIGNEMT-3

NONLINEAR DATA STRUCTURE- Tree:

1. What is Tree in data structure with proper diagram.


2. What are the applications of trees?
3. Define Root Node, Edges, External Nodes, Internal Nodes, Degree of Nodes, Level of Nodes, Pathe of
Nodes with proper example.
4. Find Root Node, Edges, External Nodes, Internal Nodes, Degree of Nodes, Level of Nodes, Pathe of
Nodes with proper example.

5. What is Binary tree and characteristics of binary tree with proper example.
6.Construct a tree for the given inorder and postorder traversals
Inorder DGBAHEICF
Postorder GDBHIEFCA

7.Construct a tree for the given inorder and preorder traversals


Inorder DGBAHEICF
Preorder GDBHIEFCA

8. Give the Preorder, Postorder and Inorder traversal of the tree given in below fig.

9. Construct binary search tree for the following data Find its inorder, preorder and postorder traversal
sequence from the BST. Show all the steps
a. 10,3,15,22,6,45,65,23,78,34,5.
b. 50, 60, 25, 40, 30, 70, 35, 10, 55, 65, 5
c. 40, 65,25, 55, 10,70,30,50,15,80,75
d. 45,56,39,12,34,78,54,67,10,32,89,81 0
e. 60, 15, 4, 30, 70, 65, 10, 95, 25, 34
10. Insertion and deletion of binary search tree. Draw the tree after each operation.
11. Define Binary tree using sequential and Linked representation.
12. Define weight balanced binary tree with proper example.
13. Define Complete and Full binary tree with proper example.
14. Define Balance factor.
15. Define LL, RL, LR, RR rotation of AVL Tree.
16. Define height of the binary tree. Define height balanced tree with its advantages. Construct
a height balanced binary tree (AVL tree) for the following data
42,06,54,62,88,50,22,32,12,33
17. Define height balanced tree. Construct a height balanced binary tree (AVL tree) for
Mr. Shiplu Das
Assistant Professor, CSE
Adamas University Data Structure and Algorithm
thefollowing data 32,16,44,52,78,40,12,22,02,23
18. Define an AVL tree. Obtain an AVL tree by inserting one integer at a time in the following
sequence. 150, 155, 160, 115, 110, 140, 120, 145, 130, 147, 170, 180. Show all the steps.
19. How delete the data from AVL tree with proper example.
20. Define a B-Tree tree. Obtain a B-Tree with order 4 by inserting one integer at a time in
the followingsequence. 150, 155, 160, 115, 110, 140, 120, 145, 130, 147, 170, 180. Show
all the steps.
21. Define a B-Tree tree. Obtain a B-Tree with order 4 by inserting one integer at a time in the
followingsequence. 15, 18, 16, 65, 10, 18, 80, 45, 30, 47, 70, 80. Show all the steps.
22. Define Red-Black Tree with proper example.
23. Deference between B-Tree and Binary Tree.
_____________________________________________________________________________
Mr. Shiplu Das
Assistant Professor, CSE
Adamas University Data Structure and Algorithm

You might also like