Skip to content

Data Structure and Algorithm Lab

ITM · Lab Midterm · Fall 25

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.

Lab Evaluation 02 Data Structure and Algorithm lab Program Title: Project ID Maintenance System Scenario: The Department of Computer Science maintains a dynamic list of active project IDs assigned to students for their final-year research projects. These project IDs are stored using a singly linked list, as the number of projects may frequently change throughout the semester.Sometimes, projects get cancelled, merged, or reassigned, so the department needs a program that can delete a project ID from the list based on its position. Task: Write a program that performs the following operations using python Instructions: (10 Marks) 1. Accepts the number of currently assigned project IDs. 2. Accepts each project ID from the user and stores them in a singly linked list. 3. Accepts the position (1-based index) of the project ID that needs to be removed. 4. Deletes the project ID at the specified position from the list. 5. Displays the updated list of project IDs after deletion. Sample Input Enter the number of active project IDs: 5 Enter project ID 1: P101 Enter project ID 2: P205 Enter project ID 3: P309 Enter project ID 4: P412 Enter project ID 5: P518 Enter the position of the project ID to delete: 3 Sample Output Updated list of project IDs: P101 -> P205 -> P412 -> P518