Cs3301 Data Structure Important Question
Cs3301 Data Structure Important Question
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
DATA STRUCTURE
IMPORTANT QUESTIONS AND QUESTION BANK
UNIT-I LINEAR DATA STRUCTURES – LIST
2-Marks
1. What are the advantages of Linked List over arrays?
2. State the advantage of ADT.
3. What is the disadvantage of linked list over array?
4. Illustrate the difference between linear linked list and circular linked list.
5. Define linked list.
6. Define an Abstract Data Type.
in
7. Distinguish between linear and nonlinear data structure.
n.
8. Differentiate arrays and linked lists
9. List out the advantage of circular linked list.
aa
10. Binary search cannot be performed on a linked list. Examine.
13-Marks
riy
e.g. P:1→2→45→56
Q:3→24→56→63→66.
w
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
in
6. State the rule to be followed during infix to postfix conversions.
7. Discuss stack and queue.
8. List the application of queue.
9. Define double ended queue.
n.
aa
10. What is circular queue?
riy
13-Marks
1. What are circular queues. Write the procedures to insert an element to circular
o
implementations.
w
3. State the advantage of circular queue over linear queue. Write the function for
insertion in a circular queue.
4. Build the max heap for the following 90,150,70,40,100,20,30,10,110. And show
the result of delete max.
5. Write an algorithm for push and pop operation on stack using linked list.
6. What is Dequeue? Explain its operation with example.
7. Illustrate the enqueue and dequeue operations on double ended queue.
8. Briefly describe the operations of queue with examples.
9. Describe with an example how to evaluate arithmetic expression using stacks.
10. 1) Describe about queue ADT in detail?
2) explain any one application of queue with suitable example?
https://www.poriyaan.in/paper/data-structure-75/
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
in
leaf
n.
4. What do you mean by level of the tree?
5. Define a binary search tree.
aa
6. How do you calculate the depth of a B-tree?
7. Define a heap and show how it can be used to represent a priority queue.
riy
13-Marks
1. Write the following routines to implement the basic binary search tree
w
operations. (i) Perform search operation in binary Search Tree. (ii) Find min and
w
Find maximum.
2. 1) Write a routine for AVL tree insertion. Insert the following elements in the
w
empty tree and how do you balance the tree after each element insertion?
Elements: 2,5,4,6,7,9,8,3,1,10.
2) Brief about B+ tree. And discuss the application oh heap.
3. 1) write a routine for post order traversal. Is it possible to find minimum and
maximum value in the binary search tree using traversal? Discuss.
2) Display the given tree (figure 13. a) using in order, Pre order and postorder
traversals.
https://www.poriyaan.in/paper/data-structure-75/
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
3) Delete 11 and 10 from the above binary search tree. And display the tree
after each deletion.
4. Explain the tree traversal techniques with an example.
5. How to insert and delete an element into a binary search tree and write down
the code for the insertion routine with an example.
6. Write an algorithm for inserting and deleting a node in a binary search tree.
7. Discuss in detail the various methods in which a binary tree can be represented.
Discuss the advantage and disadvantage of each method.
8. Discuss the different traversal technique in a binary tree with suitable algorithms
and examples?
9. Explain the construction of expression tree with examples. Give the applications
in
of trees.
10. Explain the following operation on a binary search tree with suitable
n.
algorithms.
1)Find a node.
aa
2)Find the minimum and maximum elements of binary search tree.
UNIT-IV NON-LINEAR DATA STRUCTURES - GRAPHS
riy
2-Marks
o
4. Given a weighted, undirected graph with |V| nodes, assume all weights are non-
w
negative. If each edge has weight ≤ω, what can you say about the cost of
Minimum spanning tree?
w
https://www.poriyaan.in/paper/data-structure-75/
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
in
n.
aa
5. Explain the depth first and breadth first traversal.
riy
1)Adjacency Matrix
.p
2) Adjacency list.
8. 1)Explain the topological sorting of a graph G with example.
w
10. Describe any one of the shortest path algorithms with suitable example
w
https://www.poriyaan.in/paper/data-structure-75/
w w w .p o r i y a a n .i n h t t p s: / / cse .p o r i y a a n .i n /
13-Marks
1. State and explain the shell sort. State and explain the algorithm for shell sort.
Sort the element using shell sort.
2. Distinguish between linear search and binary search. State and explain the
algorithms for both the search with example.
3. Consider a hash table with 9 slots. The hash function is h(k)=k mod 9. The
following keys are inserted in the order 5,28,19,15,20,33,12,17,10. Draw the
contents of the hash table when the collision are resolved by
1)chaining
2)linear probing
3)double hashing. The second hash function h2(x)=7-(x mod 7)
4. 1)Write a function to perform merge sort. Give example
in
2) write a routine for insertion sort. Sort the following sequence using insertion
n.
sort.3,10,4,2,8,6,5,1.
5. Write an algorithm to implement selection sort with suitable example.
aa
6. Write an algorithm for binary search with suitable example.
7. Describe how the divide and conquer technique is implemented in a binary
riy
search.
8. Explain the various collision techniques in detail with an example.
9. 1)sort the sequence 3,1,4,1,5,9,2,6,5 using insertion sort.
o
10. Describe the open addressing and chaining methods of collusion resolution
w
techniques in hashing.
w
https://www.poriyaan.in/paper/data-structure-75/
Civil
CSE
Home Mech
EEE
CSE –2nd sem Reg 2021 ECE
Elective-Management
Professional Elective II
Professional Elective IV