You are on page 1of 4

DATA STRUCTURES (PC 221- IT)

QUESTION BANK
Unit-1

1. Explain the features of Object Oriented Programming (OOP) Concepts using


examples?
2. Write a Program in C++ for Complex number class by overloading +, - and *
operators to perform addition, subtraction and multiplication of complex number
respectively.
3. Write a program in C++ to demonstrate the concept of operator overloading
(operators +,-,*,<<,>>), function overloading, types of constructor, Constructor
overloading, Inheritance.
4. Illustrate how dynamic memory allocation is performed in C++ using examples.
5. Describe how exception handling can be performed using C++?
6. Illustrate the usage of templates.
7. Define algorithm. What are the five criteria that must be followed by an
algorithm?
8. Write the algorithm or function for selection sort. Explain the concept of selection
sort with a suitable example. What is its time complexity?
9. Write the algorithm or function for binary search. Explain the concept of binary
search with a suitable example.
10. Write the algorithm or function for binary search using recursion. Explain the
concept of binary search with a suitable example. What is its time complexity?
11. Define a) Performance analysis b) Performance measurement.
12. Explain about space complexity. How do you calculate space complexity of a
function? Explain with an example.
13. Explain about time complexity. Describe the two methods used to calculate time
complexity of a function, using an example.
14. What is asymptotic notation? Define the three notations big oh, theta and omega.
15. Write and explain the program for measuring the performance of linear search
function.
16. Define abstract data type, data abstraction and encapsulation.
17. Implement Rectangle class using all C++ concepts like constructor, destructor and
operator overloading.
18. Explain the concept of inheritance with the example of bag and stack.

Unit-2

1. Write and explain the ADT for arrays.


2. Define linear list. What are the various operations that can be performed on linear
lists?
3. Explain how a polynomial is represented using a linear list. Write and explain the
ADT for polynomial.
4. Explain how arrays are represented inside the computer memory. Write the
addressing formulae for 1D, 2D, 3D and n-dimensional arrays.
5. Determine the Formula to find the address of A[i1][i2][i3]….[in] in a N-Dim
array?(Write and explain the ADT for string.
6. Write and explain the string pattern matching algorithm with a suitable example.
What is its time complexity?
7. Write and explain the Knuth-Morris-Pratt string pattern matching algorithm with
a suitable example. What is its time complexity?
8. Define stack. Explain the working of the stack data structure on arrays. Write the
algorithm or function to push and pop an element from the stack.
9. What are the various applications of stack? Explain any one of them.
10. Define queue. Explain the working of the queue data structure. Write the
algorithm to push and pop an element from the queue using arrays.
11. Write the algorithm or function to convert an infix expression to postfix form.
Explain it with an example.
12. Write the algorithm or function to evaluate the given postfix expression. Explain
it with an example.
13. Explain in detail about the “mazing” problem.
14. What is the problem in a normal queue? Why do we prefer circular queue?
15. Explain the working of the circular queue. Write the algorithm or function to push
and pop an element from the circular queue.
16. Write a C++ program to implement circular queue ADT using arrays.

Unit-3

1. What is the problem with sequential representation? What do you mean by linked
representation and what is its advantage?
2. What is a linked list? Write the algorithm or function to insert and remove an
element from the linked list.
3. Write a C++ program to implement linked list ADT.
4. What is a linked stack? Write the algorithm or function to insert and remove an
element from the linked stack.
5. Write a C++ program to implement linked stack ADT.
6. What is a linked queue? Write the algorithm or function to insert and remove an
element from the linked queue.
7. Write a C++ program to implement linked queue ADT.
8. What is a circular linked list? Write the algorithm or function to insert and remove
an element from the circular linked list.
9. Write a C++ program to implement circular linked list ADT.
10. What is the advantage of using a head node in circular list?
11. What is a doubly linked list? Write the algorithm or function to insert and remove
an element from the doubly linked list.
12. Write a C++ program to implement doubly linked list ADT.
13. Draw a doubly circular linked list with head node.
14. Explain the concept of available space lists. What is its advantage?
15. What is a chain? Write the chain class and explain its usage.
16. How a polynomial is represented using linked list? Write the algorithm or
function to add two polynomials using linked lists.
17. Define sparse matrix. How is it stored using linked representation?
18. Define dictionary.
19. Describe the concept of static hashing in detail.
20. Define hash function. Explain about various types of commonly used hash
functions like mid-square, folding and division methods with the help of
examples.
21. Define collision. Explain various open addressing techniques for
overflow/collision resolution.
22. Explain chaining collision resolution techniques.

Unit-4

1. Define tree, degree of tree, height and depth of tree, full binary tree, complete
binary tree, left skewed tree, right skewed tree.
2. Define binary tree. Differentiate between binary trees and trees.
3. Explain about array and linked representation of binary trees.
4. Define binary tree traversal. Explain about all the four traversal techniques with
the help of examples.
5. Define binary search tree. What is its advantage and disadvantage?
6. Write the function and explain how to search a binary tree using key.
7. Explain in detail with suitable examples the algorithm to insert and delete an
element in binary search tree.
8. Explain the concept of threaded binary trees with example tree.
9. Define priority queue, max tree, min tree, max heap, min heap and give examples.
10. Explain in detail the algorithms to insert and delete an element from a heap.
11. Write abstract data type (ADT) for max heap, binary tree, dictionary.
12. Define AVL Tree. What is balance factor?
13. Explain about single rotations (LL, RR) and double rotations (RL, LR) in AVL
trees with suitable examples.
14. Illustrate how insertion is done in an AVL tree using example.

Unit-5

1. Compare and contrast various sorting techniques with respect to memory space
and computing time.
2. Explain the heapsort technique and demonstrate using an example. What is its
time complexity?
3. Write the algorithm or function for insertion sort. Explain how a set of elements
are sorted using insertion sort with the help of an example. What is its time
complexity?
4. Write the algorithm or function for quick sort. Explain how a set of elements are
sorted using with the help of an example. What is its time complexity?
5. Write the algorithm or function for merge sort. Explain how a set of elements are
sorted using merge with the help of an example. What is its time complexity?
6. Write the algorithm or function for shell sort. Explain how a set of elements are
sorted using shell with the help of an example. What is its time complexity?
7. Define graph, undirected graph, directed graph, complete graph, subgraph, path,
simple path, cycle, connected graph, connected component, strongly connected
graph, strongly connected component.
8. Write and explain the ADT for graph.
9. Explain the concept of DFS Graph traversal. Write the algorithm and give an
example.
10. Explain the concept of BFS Graph traversal. Write the algorithm and give an
example.
11. Define spanning tree and minimum cost spanning tree.
12. Write kruskal's algorithm. Explain it with the help of an example.
13. Write prim's algorithm. Explain it with the help of an example.

You might also like