Skip to content

Data Structure

SWE · Midterm · Summer 26

Paper 1 of 2By Rubaet IslamSwitch

Paper 1 of 2

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 Software Engineering Midterm Examination, Summer 2026 Course Code: SE 131, Course Title: Data Structure Level: 1, Term: 3, Sections: 46 (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) Instructors: AB (A, B), DMA (C, D), MAK (F), TM (E, I, J), SHN (G), MAB (H, K, L), NSL (M, N, P), AAS (O) Time: 1 hour 30 minutes, Marks: 25 Directions: - Answer questions serially. 1. A. Classify data structure with example. [CLO-1, Level-1] [Marks: 2+2] B. State the differences between Array and Linked List. 2. A university library maintains a sorted array of Book IDs in ascending order: [105, 112, 118, 125, 132, 140, 150] [CLO-2, Level-2] [Marks: 2+2] Every time a new book arrives, its ID must be inserted into the correct position to maintain the sorted order. When a book is permanently removed from the library, its ID must also be deleted from the array. Today, the librarian performs the following operations: Insert 120 Delete 125 Insert 135 Delete 150 A. Give the contents of the array after each insertion and deletion operation. B. Based on the final array, compute the time complexity of Linear Search and Binary Search for finding a Book ID. Which searching algorithm is more suitable for this system? Justify your answer. 3. A. A software engineering student is developing a character search feature for a compiler-like program. The program stores some alphabet characters in a sorted array: [a, c, d, f, g, h, j, k, l, m, n, o, q, r, s, t, u, v, x, z] and search for "111" using binary search (ASCII value of a = 97, c=99 and so on). Show the steps of Binary Search. [CLO-3, Level-3] [Marks: 2+4] B. A class has two lists of student marks, each containing N elements: List A: Marks are already sorted in ascending order. List B: Marks are sorted in descending order (reverse order). If Bubble Sort is applied to sort in ascending order for both lists: i. Show, which list will require more swap and why? ii. Show the steps. 4. A. A software company uses a singly linked list to maintain the active bug-fixing list of a mobile application. [CLO-3,Level-3] [Marks: 6] Each bug ticket is stored in one node. Each node occupies 8 bytes, and memory is allocated sequentially from address 7000, 7008, 7016, 7024, 7032, 7040, 7048 At the beginning, six bug tickets are added to the linked list in this order: B101, B102, B103, B104, B105, B106 Perform the following operation: a) Sketch the initial bug-fixing linked list with all six tickets in order. b) Two urgent security bugs arrive and must be placed in specific positions: - B109 must be placed immediately after B102 - B110 must be placed immediately after B104 Sketch the updated linked list. c) Using the updated linked list from part (b), two bugs B103 and B105 are marked as already fixed and should no longer appear in the active linked list. Sketch the linked list again. B. A code editor keeps track of the most recent editing actions made by a programmer. The latest editing action always stays on top, and when an action is removed, the most recently recorded action is removed first. The maximum size of the editing history is 5. [CLO-3, Level-3] [Marks: 5] Initially, the editor contains the following actions in memory: E1, E2, E3, E4 Illustrate the following operations step by step: a) Draw the initial arrangement of editing actions, clearly indicating the top action and array index positions. b) Two new editing actions E5 and E6 are made and added to the editing history. c) Three actions are removed from the editing history one after another. d) Four more actions are removed consecutively. e) Write the main part of a C code to add a new editing action to the current editor history.