Assignment/Practice Questions of Data Structures and Algorithms.
BCA Third Semester
Unit 1 Introduction to data structure
1. What is an algorithm? Explain with its characteristics and example.
2. Define data structure. Classify data structure.
3. Explain data structure operations and list the importance of data structures.
4. Explain an Abstract Data Type.
5. Discuss on time and space complexity of algorithms with examples.
6. Define the worst case, best case and average case complexities with examples.
7. Write short notes on asymptotic notations.
Unit 2: Stack
1. Explain Stack data structure with its applications.
2. Write down the algorithms for push and pop operations on stack.
3. Explain stack as an ADT.
4. Write down the algorithms for converting
a) Infix expression to postfix expression. b) Infix expression to prefix expression.
5. Write down the algorithms for evaluating:
a) Postfix expression b) Infix expression c) Prefix expression
6. Translate the following infix expression into its equivalent postfix expression using algorithm:
((A-(B+C))*D)$(E+F)
7. Evaluate the following postfix expression:
AB+C*DEFG*+/+H-, Where A=4, B=8, C=2, D=5, E=6, F=9, G=1, H=3
Unit 3: Queue
1. Explain queue data structure with its applications.
2. Explain queue as an ADT.
3. Differentiate between linear and circular queue
4. Write down the algorithms for enqueue and dequeue operation in a linear queue.
5. Write down the algorithms for enqueue and dequeue operation in a circular queue.
6. Explain the priority queue with its operations and applications.
Unit 4: List
1. Explain list data structure with its applications.
2. Explain list as an ADT.
3. Differentiate between static and dynamic list structure.
Unit 5: Linked List
1. Explain linked list data structure with its applications.
2. Explain linked as an ADT.
3. Describe the different types of linked list.
4. Write down the algorithms to insert an item in singly linked list:
a) Start of the linked list b) End of the linked list c) Specific location of linked list
5. Write down the algorithms to delete an item from singly linked list:
a) Start of the linked list b) End of the linked list c) Specific location of linked list
6. Write down the algorithms to insert an item in doubly linked list:
b) Start of the linked list b) End of the linked list c) Specific location of linked list
7. Write down the algorithms to delete an item from doubly linked list:
a) Start of the linked list b) End of the linked list c) Specific location of linked list
8. Explain linked list implementation of stack and queue.
Unit 6: Recursion
1. Define recursion. Explain its types. Write down the advantages and disadvantages of recursion.
2. Differentiate between recursion and iteration.
3. Write down the recursive algorithms to:
a) Calculate factorial b) Reversing an integer c) Fibonacci series
4. Explain TOH problems. Write down the recursive algorithm to solve this problem.
Unit 7: Trees
1. Explain tree data structure with its applications. Explain tree as an ADT.
2. Define binary tree, complete binary tree, extended binary tree with examples.
3. Explain the different traversal techniques used in binary tree with examples.
4. A binary tree T has 12 nodes. The in-order and pre-order traversals of T yield the following
sequence of nodes: In-order: ABCDEFGHIJKL Pre-order: BAHCEDGFJILK. Construct the Binary tree
T showing each steps in detail.
5. What is BST? Write down the algorithms to search data, insert data and delete data from BST.
6. Draw a Binary Search Tree (BST) from the string DATASTRUCTURE and traverse the tree in post
order and pre order.
7. What is AVL tree? Construct AVL tree from given data set: 4, 6, 12, 9, 5, 2, 13, 8, 3, 7 and 11.
8. Explain Huffman Algorithm with its application and example.
9. Write short notes on B-Tree.
Unit 8: Sorting
1. Define Sorting. Differentiate between Internal and External Sorting.
2. List out the different sorting algorithms with their best, average and worst case complexities.
3. Explain bubble sort with an example and algorithm.
4. Explain selection sort with an example and algorithm.
5. Explain insertion sort with an example and algorithm.
6. Explain quick sort with an example and algorithm.
7. Explain quick sort algorithm with Big-oh notation in best case, average case and worst case and
trace it to sort the data: 8, 10, 5, 12, 14, 5, 7 and 13.
8. Explain merge sort with an example and algorithm.
9. Explain radix sort and shell sort with an example.
10. Use Heap Sort algorithm to sort the following data set: 40, 30, 50, 20, 60, 52, 70, 55
Unit 9: Searching
1. Define Searching. List out applications of searching.
2. Explain sequential search with an example and algorithm.
3. Explain binary search with an example and algorithm.
4. What is Hashing? Define the terms: Hash function, Hash table and Hash Collision.
5. Explain different hash collision resolution techniques.
6. Consider a hash table of size 10. Insert the keys 62, 37, 36, 44, 67, 91 and 107 using linear probing.
Unit 10: Graph
1. Explain graph data structure with its applications. Explain graph as an ADT.
2. Describe different types of graphs.
3. Explain graph traversal methods with their algorithms.
4. Define the terms: transitive closure, spanning tree, minimum spanning tee and spanning forest
with examples.
5. Explain Warshall’s algorithms with its use and an example.
6. Explain Dijkstra’s algorithms with its use and an example.
7. Explain Kruskal’s algorithms with its use and an example.
8. Explain Prim’s algorithms with its use and an example.
9. Write short notes on greedy algorithm.
Unit 11: Algorithms
1. Differentiate between deterministic and non-deterministic algorithm.
2. What do you mean by divide and conquer algorithm. Explain with an example.
3. Write short notes on:
a) Series and parallel algorithm b) Heuristic and approximate algorithm