0% found this document useful (0 votes)
50 views5 pages

Data Structures Question Bank

The document outlines a comprehensive set of short and long answer questions related to algorithms, data structures, and their complexities across five units. Topics include specifications of algorithms, types of data structures, performance analysis, and various sorting and searching techniques. It also covers specific algorithms for linked lists, stacks, queues, trees, and graphs, along with their applications and characteristics.

Uploaded by

utukamwinayk.24
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)
50 views5 pages

Data Structures Question Bank

The document outlines a comprehensive set of short and long answer questions related to algorithms, data structures, and their complexities across five units. Topics include specifications of algorithms, types of data structures, performance analysis, and various sorting and searching techniques. It also covers specific algorithms for linked lists, stacks, queues, trees, and graphs, along with their applications and characteristics.

Uploaded by

utukamwinayk.24
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/ 5

UNIT 1

SHORT ANSWER QUESTIONS

QUESTION
1. Discus various specifications of an algorithm?
2. Define space complexity of an algorithm with an example
3. Differentiate between recursion and iteration.
4. Explain data structures and its types
5. Define time complexity of an algorithm with an example
6. List various operations that can be performed using data structures
7. Differentiate between linear and Non-Linear Data Structure
8. Discus the advantages of using data structures

LONG ANSWER QUESTIONS

QUESTION
1. Explain the different types of asymptotic notations (Big O, Big Theta, and Big
Omega) and their significance in performance analysis of algorithms
2. Evaluate the advantages and disadvantages of using recursive algorithms compared
to iterative algorithms. Provide examples to support your points.
3. Evaluate the best, worst and average case for the following
3n2+2n+1
4. Critically assess the importance of amortized analysis in algorithms. Provide a
detailed example where amortized analysis is used to demonstrate its benefit over
average-case analysis.
5. Compare and contrast the performance analysis of algorithms with respect to time
complexity and space complexity. Provide examples where one type of complexity
is more critical than the other.
6. Apply the concept of recursive algorithms to solve the Tower of Hanoi problem.
Explain your approach and provide the pseudocode.
7. Design an algorithm for processing student data using structures
8. Consider the piece of code below
int Add(int A[],int B[], int C[],int n)
{
int i ,j;
for(i = 0; i < n;i++)
{
for(j=0;j<n;j++)
{
C[i][j] = A[ i][j]+B[i][j];
}
}
}
Find the time and space complexity of above-mentioned code.
UNIT 2

SHORT ANSWER QUESTIONS

QUESTION
1. List the advantages and drawbacks of SLL
2. Describe the concept of circular linked list
3. Differentiate between array and linked list
4. Describe the concept of circular linked list
5. List the advantages and drawbacks of DLL
6. Compare Single and Double Linked Lists
7. Write an algorithm to traverse a given SLL
8. Write an algorithm to traverse a given SLL

LONG ANSWER QUESTIONS

QUESTION
1. Write and explain an algorithm to insert an element into a sorted singly linked list
while maintaining the order.
2. Demonstrate the insertion operation in DLL
3. Demonstrate the insertion operation in SLL
4. Design a linked list-based implementation of a queue and explain how enqueue and
dequeue operations would be performed.
5. Demonstrate the deletion operation in SLL
6. Demonstrate the deletion operation in DLL
7. Explain the concept of Circular Double Linked List using an example
8. Design an algorithm to implement stack using SLL
UNIT 3

SHORT ANSWER QUESTIONS

QUESTION
1. Distinguish between stack and queue.
2. Define a Queue and list types of queues
3. List the operations and applications of stack.
4. List the operations and applications of queue
5. Write an algorithm for push operation on stack.
6. Write an algorithm for pop operation on stack.
7. Explain the concept of circular queue
8. Define a Dequeue and its advantages

LONG ANSWER QUESTIONS

QUESTION
1. Write a C program to perform all the operations of a Stack.
2. Write a C program to perform all the operations of a Queue.
3. Design an algorithm for implementation of Dequeue
4. Explain mechanism to convert an infix expression to prefix and postfix expressions
using an example
5. Write the postfix form of each of the following infix expression.
A-B+(C$D)*(E+F)-G/H B) K+L-M*N+(O+P)
6. Write a c program to implement a stack to convert infix to postfix expression.
7. Illustrate the working circular queue using an example
8. Convert the following Infix expression into Postfix expression.
a) (A + B) / (C + D) – (D * E)
b) (A–B) * (C+D)
c) A – (B / C + (D % E * F) / G)* H
UNIT 4

SHORT ANSWER QUESTIONS

QUESTION
1. What is Binary search tree? Write the application areas that use a binary search
tree.
2. Explain Binary tree, Binary search tree and complete binary tree.
3. List the three types of traversals and explain them briefly.
4. List the applications of trees.
5. Difference between complete binary tree and full binary tree.
6. Define a Balance factor and give an example tree with balance factor of each node.
7. Define heap data structure and explain min heap and max heap.
8. Define graph and types of graph traversal

LONG ANSWER QUESTIONS

QUESTION
1. The Inorder and Preorder traversal of a tree are given below:
Inorder: DBMINEAFCJGK
Preorder: ABDEIMNCFGJK
i) construct the corresponding binary tree
ii) Determine the postorder traversal of the tree drawn.
2. Define a tree and explain the following terms:
a)Root node b) Leaf node c) Ancestor node d) Descendant node.
3. Write an algorithm for Inserting a New Node in a Binary Search Tree.
4. Insert the nodes with values 12 and 55 in the given binary search tree

5. Construct an AVL tree by inserting the following elements in the given order. 63, 9,
19, 27, 18, 108, 99, 81.
6. Write an algorithm for Insert operation in max heap and construct max heap for the
following elements 35 33 42 10 14 19 27 44 26 31
7. Create a binary search tree using the following data elements: 45, 39, 56, 12, 34,
78, 32, 10, 89, 54, 67, and 81
8. Write preorder, postorder, inorder for the following tree
UNIT 5

SHORT ANSWER QUESTIONS

QUESTION
1. Discuss the characteristics of linear search.
2. Which sorting algorithm is best if the list is already sorted? Why?
3. State the logic of bubble sort algorithm.
4. What are the problems in hashing?
5. Write the Applications of Graphs
6. What is meant by strongly connected in a graph?
7. Make distinction between bubble sort and quick sort.
8. Discuss the features of Hashing.

LONG ANSWER QUESTIONS

QUESTION
1. Write an algorithm for Heap Sort and provide a detailed example to illustrate the
sorting process.
2. Design a custom sorting algorithm that combines features of Quick Sort and Heap
Sort
3. Compare the effectiveness of different probing techniques (linear probing,
quadratic probing, double hashing) in hashing.
4. Explain the algorithm for bubble sort and give a suitable example.
5. Given the following graph:

Perform both Breadth-First Search (BFS) and Depth-First Search (DFS) starting from
vertex A. Provide the order in which the vertices are visited for both searches.
6. Compare the working of Quick Sort and Merge Sort by using the following list of
elements:
22, 30, 10, 15, 9, 27, 5, 19, 7, 11
7. Explain various graph traversals with examples.
8. Implement a C program to perform linear and binary search on a given array.

You might also like