Skip to content

Data Structures

CSE · Final · Fall 25

Batch 68

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Faculty of Science & Information Technology Department of Computer Science & Engineering Final Examination, Fall 2025 Course Code: CSE123, Course Title: Data Structure Level: 1 Term: 3 Batch: 68 Time: 02:00 Hrs Marks: 40 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. A logistics company is redesigning its backend system to handle unique package IDs more efficiently. To improve search, insertion, and deletion operations, the engineers decide to store all unique package IDs in a specially organized tree structure where each ID follows a specific ordering rule. The company has provided the following unique package IDs: (45, 12, 78, 34, 56, 90, 23, 67) a) Write a C program to create the tree from the given data elements and display all the package IDs in ascending order based on the tree's ordering property. | 4 b) Write a function (deleteID) to delete a specific package ID from the tree. | 4 | CO2 c) The logistics company discovers that 56 package IDs was mistakenly inserted into the tree. Now write a C function to update the incorrect package ID (replace 56 with 65) while maintaining the tree's ordering property. | 4 2. A tech company is testing a self-balancing data structure for fast searching and provides the following unique integers to be stored in a tree: (40, 20, 60, 10, 30, 50, 70, 25, 60, 55) | CO3 a) Construct the tree step-by-step after inserting all the elements in the given order, clearly showing self-balancing wherever they occur. | 5 b) Draw the updated tree after deleting the element 30 while maintaining height balance. | 3 3. A ride-sharing company is developing a priority system to always identify the driver with the highest rating during peak hours. To efficiently process the ratings, the system stores them in a Heap, where the highest-rated driver is always at the top. You are given the following unique driver ratings: (42, 15, 88, 27, 63, 51, 90, 33) | CO3 a) Build the Heap step-by-step after inserting all driver ratings in the given order. | 4 b) Show the inorder, preorder and postorder of Q3(a) heap. | 3 c) Draw the updated Heap after deleting the highest-rated driver from the heap. | 3 4. A city transit authority is designing a routing aid for commuters on a small metro network. Stations: Central (C), North (N), East (E), South (S), West (W), Park (P), Hill (H), Market (M), River (R), Harbor (B). Directed edges (unweighted): C -> N, C -> W, C -> E, N -> P, W -> P, E -> H, E -> M, P -> H, H -> B, M -> R, R -> B, P -> R. a) Construct the directed graph (clearly label all nodes and edges) and show the corresponding adjacency matrix. | 4 | CO3 b) Show the step-by-step procedure for finding the shortest path from Central (C) to Harbor (B) using either BFS or DFS and justify your choosing technique. | 6