B.Tech R23 Data Structures Important Questions
UNIT I
2 Marks Questions:
- What is a Linear Data Structure? Name a few examples.
- Define Abstract Data Type and give two examples.
- What is the difference between time complexity and space complexity?
5 Marks Questions:
- How do time and space complexity analysis help in understanding and comparing different algorithms of data structures?
- What is binary search? Write an algorithm for binary search and trace with an example.
- What is linear search? Explain the time and space complexity analysis of linear search algorithm.
- Explain about Insertion Sort technique with example.
- Implement selection sort algorithm and analyze its best, average, and worst-case time complexities.
- Explain bubble sort algorithm with step-by-step execution and analyze its time and space complexity.
UNIT II
2 Marks Questions:
- How many pointers are necessary to implement a simple Linked List?
- What are the advantages of linked lists over arrays?
- Define circular linked list and mention one application.
5 Marks Questions:
- Write an algorithm to insert new node at the beginning, at middle position and at the end of a Singly Linked List.
- What are the advantages and disadvantages of Linked list over Arrays. Write a simple program to read student details.
- Explain the representation of single linked list and its implementation. Write the pseudo code for insertion, deletion and traversal operations on single linked list.
- Describe the structure of Double linked list. Devise the operations on Double linked list. Give the suitable examples.
- Implement circular linked list and explain its advantages over linear linked lists with applications.
- Write algorithms for reversing a singly linked list using both iterative and recursive approaches.
UNIT III
2 Marks Questions:
- What do you mean by Stack?
- Define stack and mention its key properties (LIFO principle).
- What is stack overflow and stack underflow?
5 Marks Questions:
- Write an algorithm to implement stacks using arrays.
- Convert the following Infix expression to postfix and prefix expression: ( a + b / c) * d / (e - f) + g
- Explain how Infix to postfix Transformation can be done using stacks. Give suitable example.
- Explain application of Stack in recursive functions with example.
- Implement stack using linked lists and compare it with array implementation in terms of advantages and disadvantages.
- Describe how stacks are used in backtracking algorithms with a practical example and implementation.
UNIT IV
2 Marks Questions:
- What is dequeue?
- Define queue and explain FIFO principle with example.
- What is the difference between queue and deque?
5 Marks Questions:
- Write an algorithm to implement queue using arrays.
- Describe how queues are utilized in breadth-first search algorithm.
- Define double-ended queues and outline their operations, including insertion and deletion operations at both ends.
- Discuss the applications of deques with suitable example.
- Implement queue using linked lists and analyze the advantages over array implementation.
- Explain the application of queues in CPU scheduling and process management with detailed examples.
UNIT V
2 Marks Questions:
- What is a binary search tree traversal?
- Define binary search tree and mention its key property.
- What is collision in hashing and name two collision resolution techniques?
5 Marks Questions:
- What is binary search tree? Describe the process of inserting a node into a binary search tree. Explain the algorithm for BST insertion, analyze its time complexity and give the suitable examples.
- Write a recursive algorithm for in-order, pre-order, post-order tree traversal and verify search tree? Construct the Binary search tree for 46, 25, 12, 35, 32, 30
- What is hash function? Explain the different hash functions with examples.
- What is collision? Explain with example. Explain the different collision resolution techniques with examples.
- Implement binary search tree with insertion, deletion, and all traversal methods (inorder, preorder, postorder) with complete algorithms.
- Explain hashing concept, hash tables with basic implementation and operations, and discuss applications of hashing in unique identifier generation and caching.