0% found this document useful (0 votes)
47 views6 pages

Data Structures Questions for CSE 3rd Sem

The document outlines a series of module-wise questions for a Data Structures course at Nalanda Institute of Technology, Bhubaneswar, covering various topics such as linked lists, stacks, queues, trees, graphs, and sorting algorithms. It includes both short and long questions aimed at assessing students' understanding of fundamental concepts and operations related to data structures. The questions are categorized into modules, each focusing on specific areas of data structures and their applications.

Uploaded by

somyaranjan.9557
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)
47 views6 pages

Data Structures Questions for CSE 3rd Sem

The document outlines a series of module-wise questions for a Data Structures course at Nalanda Institute of Technology, Bhubaneswar, covering various topics such as linked lists, stacks, queues, trees, graphs, and sorting algorithms. It includes both short and long questions aimed at assessing students' understanding of fundamental concepts and operations related to data structures. The questions are categorized into modules, each focusing on specific areas of data structures and their applications.

Uploaded by

somyaranjan.9557
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

NALANDA INSTITUTE OF TECHNOLOGY, BHUBANESWAR

MODULE WISE QUESTIONS


SUB: DATA STRUCTURE SEM: 3RD CSE

MODULE-I

SHORT QUESTIONS [2 MARKS]


1. Define Data Structures
2. Define Linked Lists
3. State the different types of linked lists
4. List the basic operations carried out in a linked list
5. List out the advantages of using a linked list
6. List out the disadvantages of using a linked list
7. List out the applications of a linked list
8. State the difference between arrays and linked lists
9. Define an Abstract Data Type (ADT)
10. What are the objectives of studying data structures?
11. Define searching
12. Mention the types of searching
13. What is meant by linear search?
14. What is binary search?
LONG QUESTIONS [6/16 MARKS]

1. What is Data Structure? Explain Various types of Data Structure in detail.


2. What do you mean by Array? Describe the storage structure of Array. Also Explain
Various types of Array in detail.
3. What is Stack? Why it is known as LIFO? Write algorithm of PUSH, POP, and
TRAVERSE operation on Stack.
4. List the types of Binary Search Tree. Explain Insertion and Deletion Operation on
Binary Search Tree with Example.
5. List the types of Linear Search Tree. Explain Insertion and Deletion Operation on
Linear Search Tree with Example.
6. What do you mean by Searching? Explain Sequential search and Binary
search with help of example.
MODULE-II

SHORT QUESTIONS [2 MARKS]


1. What are the types of queues?
2. List the applications of stacks
3. List the applications of queues
4. Define a stack
5. List out the basic operations that can be performed on a stack
6. State the different ways of representing expressions
7. State the rules to be followed during infix to postfix conversions
8. Mention the advantages of representing stacks using linked lists than arrays
9. Define a queue
10. Define a priority queue
11. State the difference between queues and stack
12. Define a Dequeue
13. What is the need for Priority queue?
14. Define a circular queue

LONG QUESTIONS [6 / 16 MARKS]

1. List the applications of Stack. What is Recursion? Explain Recursion for find a factorial
of number in detail.

2. Write an algorithm for converting Unparenthesized Infix expression into Postfix


expression.

3. Write an algorithm for converting Parenthesized Infix expression into Postfix expression

4. What is Queue? Why it is known as FIFO? Write an algorithm to insert and delete an
element from a simple Queue.

5. What are Circular Queue and Priority Queue? Write an algorithm to insert and delete
an element from a Circular Queue.

6. Convert following Infix expression into Postfix expression using Tabular method.

a–b/c*d+e*f/g
MODULE-III

SHORT QUESTIONS [2 MARKS]


1) Mention what is Linked lists?
2) What type of memory allocation is referred for Linked lists?
3) Mention what is traversal in linked lists?
4) Describe what is Node in link list? And name the types of Linked Lists?
5) Mention what is Singly Linked list?
6) Mention what is the difference between Linear Array and Linked List?
7) Mention what are the applications of Linked Lists?
8) What does the dummy header in linked list contain?
9) Mention the steps to insert data at the starting of a singly linked list?
10) Mention what is the difference between singly and doubly linked lists?
11) Mention what are the applications that use Linked lists?
12) Explain how to add an item to the beginning of the list?
13) Mention what is the biggest advantage of linked lists?
14) Mention how to delete first node from singly linked list?
15) Mention how to display Singly Linked List from First to Last?
16) Mention how to insert a new node in linked list where free node will be available?
17) Mention for which header list, you will found the last node contains the null pointer?

LONG QUESTIONS [6 / 16 MARKS]

1. What do you mean by Link list? Write an algorithm to insert and delete a node in Singly Linked List.
2. What is Doubly Linked List? Write an algorithm to insert and delete a node in Doubly Linked List.
3. What is Circular Linked List? State the advantages and disadvantages of Circular Link List Over
4. Doubly Linked List and Singly Linked List. Also write advantages of Linked List over an Array
MODULE- IV

SHORT QUESTIONS [2 MARKS]


1. Define a tree
2. Define root
3. Define degree of the node
4. Define leaves
5. Define internal nodes
7. Define parent node
8. Define depth and height of a node
9. Define depth and height of a tree
10. What do you mean by level of the tree?
11. Define forest
12. Define a binary tree, full binary tree, complete binary tree
13. Define a path in a tree
14. State the properties of a binary tree
15. What is meant by binary tree traversal?
16. What are the different binary tree traversal techniques?
17. What are the tasks performed during inorder traversal?
18. What are the tasks performed during postorder traversal?
19. State the merits of linear representation of binary trees.
20. State the demerit of linear representation of binary trees.
21. State the merit of linked representation of binary trees.
22. State the demerits of linked representation of binary trees.
23. Define a binary search tree
24. What is the use of threaded binary tree?
25. In the given binary tree, using array you can store the node 4 at which location?
26. Define AVL Tree.
27. What do you mean by balanced trees?
28. What do you mean by balance factor of a node in AVL tree?
29. Define Graph.
30. Define adjacent nodes.
31. What is a directed graph?
32. What is an undirected graph?
33. What is a loop?
34. What is a simple graph?
35. What is a weighted graph?
36. Define outdegree of a graph?
37. Define indegree of a graph?
38. Define path in a graph?
39. What is a simple path?
40. What is a cycle or a circuit?
41. What is an acyclic graph?
42. What is meant by strongly connected in a graph?
43. When is a graph said to be weakly connected?
44. What is an undirected acyclic graph?
45. What are the two traversal strategies used in traversing a graph?
46. What is a minimum spanning tree?
47. Name two algorithms two find minimum spanning tree
48. Define graph traversals.
49. List the two important key points of depth first search.
50. What do you mean by breadth first search (BFS)?
51. What do you mean by tree edge?

LONG QUESTIONS [6 / 16 MARKS]

1. What is Binary Tree? Explain Representation of Binary tree. Also explain different
operation that can be performed on Binary tree.
2. What is Spanning Trees? Explain Spanning Tree in detail with example.
3. Explain Inorder, Preorder and Postorder Traversal operation on Binary tree with
example
4. List the types of Binary Search Tree. Explain Insertion and Deletion Operation on
Binary Search Tree with Example
5. What is the meaning of height balanced tree? How rebalancing is done in height
balanced tree.
6. Construct a tree for the given inorder and postorder traversals.
Inorder : DGBAHEICF Postorder : GDBHIEFCA
7. Discuss following with reference to trees. (i) Height of the tree (ii) Complete Binary Tree
(iii) Expression tree (iv) Sibling (v) Full Binary Tree
8. Write a short note on Threaded binary tree.
9. Discuss following with reference to graphs. (i) Directed graph (ii) Undirected graph (iii)
Degree of vertex (iv)Null graph (v) Acyclic Graph
10. Define an AVL tree. Obtain an AVL tree by inserting one integer at a time in the
following sequence. 150, 155, 160, 115, 110, 140, 120, 145, 130, 147, 170, 180. Show
all the steps
11. What is Graph? Explain matrix and linked list representation of a graph. Also give the
application of Graph.
12. Explain Breadth First Search traversal of Graph using an example.
13. Explain Depth First Search traversal of Graph using an example.
14. Create a Binary Search Tree for the following data and do in-order, Preorder and Post-
order traversal of the tree. 50, 60, 25, 40, 30, 70, 35, 10, 55, 65, 5
UNIT V

SHORT QUESTIONS [2 MARKS]


1. Define sorting
2. Mention the types of sorting
3. What do you mean by internal and external sorting?
4. Define bubble sort
5. How the insertion sort is done with the array?
6. What are the steps for selection sort?
7. What is Divide and Conquer Approach?
8. What are the steps in quick sort?
9. Define radix sort.
10. What are the advantages of insertion sort?
11. Define hashing function.
12. What is open addressing?
13. What are the collision resolution methods?
14. Define Hashing.
15. What do you mean by hash table?
16. What do you mean by hash function?
17. Write the importance of hashing.
18. What do you mean by collision in hashing?
19. What are the types of collision resolution strategies in open addressing?
20. What do you mean by primary & secondary clustering?
21. What do you mean by double hashing?
22. What do you mean by rehashing?
23. What is the load factor in hashing?

LONG QUESTIONS [6 / 16 MARKS]

1. Explain Selection Sort with the help of example.


2. Explain Bubble Sort with the help of example.
3. Explain Merge Sort with the help of example.
4. Explain Quick Sort with the help of example.
5. Explain Radix Sort with the help of example.
6. What is Hashing? Explain Different Hash function method in detail. Explain each one.
7. Explain the basic two techniques for Collision-resolution in Hashing with example. Also
explain primary clustering.
8. Sort the elements by using Heap sort
11, 2, 9, 13, 57, 25, 17, 1, 90, 3.

*******************************

Common questions

Powered by AI

Breadth-First Search (BFS) and Depth-First Search (DFS) serve different purposes in graph traversal. BFS explores neighbors level by level, making it suitable for finding the shortest path in unweighted graphs, which is useful in shortest path algorithms. Its queue-based implementation may lead to higher memory usage but ensures a breadth-first progression. DFS, on the other hand, dives deep along a path before backtracking, which is ideal for applications like solving puzzles or finding strongly connected components. DFS can be implemented with less memory using a stack. Both algorithms can have different performance outcomes based on graph structure and size .

Arrays and linked lists differ in several key aspects. In terms of structure, arrays are collections of elements stored in contiguous memory locations, allowing for constant-time access via indices. Conversely, linked lists consist of nodes, each containing data and a reference to the next node, leading to potentially non-contiguous memory allocation. This structural difference means arrays can offer faster access times, while linked lists provide more efficient insertion and deletion operations. Linked lists can more easily manage dynamic memory allocation and varying list sizes without necessitating reallocation or resizing, unlike arrays .

Queues are fundamental for managing processes in operating systems due to their FIFO (First-In-First-Out) nature, which ensures orderly execution of tasks. This property enables fair scheduling, allowing processes to be handled in order of arrival. However, queues can lead to potential drawbacks, such as bottlenecking when the queue is single-threaded, potentially causing delays in processing. Despite this, their ability to handle tasks serially aids in maintaining system stability and predictability of task processing .

Merge Sort and Quick Sort both implement the divide and conquer paradigm by recursively dividing the dataset into subproblems, solving them independently, and then combining results. Merge Sort divides the list into two halves, sorts them, and then merges them, guaranteeing O(n log n) complexity, making it stable and predictable in performance. Quick Sort, in contrast, selects a pivot and partitions the array into elements less than and greater than the pivot, sorting these separately. While potentially faster on average (O(n log n)), Quick Sort's performance can degrade to O(n²) in the worst case if poor pivot choices occur but can be mitigated by choosing optimal pivots .

An AVL Tree is a type of self-balancing binary search tree where the height of the two subtrees of a node differ by at most one. If this condition is violated during insertions or deletions, rotations are performed to restore balance, ensuring operations remain close to O(log n) in complexity. This balancing reduces the likelihood of degeneration into a linear structure, thus offering consistently efficient operations even under extensive modifications, unlike a standard binary search tree which may degrade to O(n) complexity if not balanced, such as when repeatedly inserting sorted data .

Bubble Sort operates by repeatedly stepping through the list, comparing adjacent elements and swapping them if they are in the wrong order. This process is repeated until the list is sorted. For optimization, an early exit can be implemented by tracking whether any swaps occurred during a pass; if not, the list is already sorted and the algorithm can terminate early, reducing unnecessary comparisons. Despite these improvements, Bubble Sort's performance remains O(n²) on average, making it inefficient for large datasets compared to other algorithms such as Quick Sort or Merge Sort .

Singly linked lists, which contain nodes with data and a single reference to the next node, are memory efficient due to needing less storage per node. Doubly linked lists add another layer by having two references, one to the next node and one to the previous, increasing memory usage but facilitating bidirectional traversal and easier deletion of nodes. Circular linked lists, either singly or doubly, facilitate continuous traversal from the tail to the head, offering potential efficiency improvements in looping operations. The choice between these depends on the specific operational needs and memory availability .

Recursion applies to computing factorials by defining the problem in terms of itself: factorial n (n!) is n * factorial (n-1) until n is 0 or 1, which is the base case. This recursive approach is frequent in functional programming for its simplicity and clear structure. However, each recursive call adds a frame to the call stack, leading to memory overhead and potential stack overflow for large n. The time complexity is O(n) due to n levels of recursive calls, which can be mitigated by using a loop-based iterative approach or applying tail recursion, optimized by some compilers to prevent deep stack usage .

Hashing plays a crucial role in data retrieval by enabling constant time complexity, O(1), in the average case for lookups. This efficiency arises from the use of hash functions that map data keys to specific indices in a hash table. However, collisions, which occur when two keys hash to the same index, present a challenge. Solutions to collision include open addressing, where a probe sequence is employed to find an empty slot, and chaining, where each table index points to a linked list of entries. Effective hash function design and resolution strategies are critical to maintain efficiency and minimize collisions .

A Binary Search Tree (BST) is vital in computer algorithms due to its ordered structure, which supports efficient searching, insertion, and deletion operations with average time complexities of O(log n). Each node in a BST has at most two children, where the left child's key is less than its parent node, and the right child's key is greater, facilitating efficient binary search implementations. This recursive partitioning of data allows logarithmic time complexity for search operations, which is significantly more efficient than linear search methods for large datasets .

You might also like