0% found this document useful (0 votes)
3 views4 pages

FDS Assignment

The document outlines an assignment for the Computer Engineering department at Sanjivani College of Engineering, focusing on various data structures and algorithms. It includes questions related to library systems, hospital patient records, student marks storage, online store product sorting, and employee records management. Each section requires definitions, explanations, and examples to illustrate concepts such as ADTs, time complexity, and data structure types.

Uploaded by

jaydodiya273
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)
3 views4 pages

FDS Assignment

The document outlines an assignment for the Computer Engineering department at Sanjivani College of Engineering, focusing on various data structures and algorithms. It includes questions related to library systems, hospital patient records, student marks storage, online store product sorting, and employee records management. Each section requires definitions, explanations, and examples to illustrate concepts such as ADTs, time complexity, and data structure types.

Uploaded by

jaydodiya273
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

Sanjivani Rural Educational Society’s

SANJIVANI COLLEGE OF ENGINEERING


(An Autonomous Institution)
Kopargaon – 423 603, Maharashtra.
Academic Year: Date:
Department: Computer Engineering
2025-26 25/3/2026
Subject: FDS,
Assignment-1 Unit 1
ESIT137
Answer the following questions:

1. A library system maintains information about books, members, and borrow records.
The system needs to organize data efficiently for search, addition, and deletion
operations.

Based on this scenario, answer the following questions:

a. Define a data structure and an abstract data type (ADT) in the context of the
library system.
b. Explain why using an ADT is better than storing raw data arrays for managing
library books.
c. Design a simple ADT to manage book records (Book ID, Title, Author) and show
operations to add a book and get details.

2. A hospital maintains patient records. The system stores simple values like age and ID,
organizes patients sequentially in a list, and organizes doctors and departments in a
hierarchical structure.

Based on this scenario, answer the following questions:

a. List examples of primitive and non-primitive data structures from the hospital
system.
b. Explain the difference between linear and non-linear data structures using patient
lists and doctor-department hierarchies.
c. Given a small dataset of patients’ IDs [101, 102, 103], choose a suitable linear
data structure and illustrate how to add a new patient 104.

Prof. P. B. Dhanwate Page 1


3. A school stores student marks. Once entered, marks are rarely updated but new
students are added frequently. Previous marks must remain unchanged for reports.

Based on this scenario, answer the following questions:

a. Define static and dynamic data structures with examples from student marks
storage.
b. Explain persistent vs ephemeral data structures and why persistent storage is
preferred for keeping historical student records.
c. Given an array [70, 85, 90] for marks, illustrate how a dynamic data structure
can be used to add a new mark 95 without overwriting existing data.

4. A small online store runs a search algorithm to find products in a list of size n. You
want to analyze the algorithm’s efficiency.

Based on this scenario, answer the following questions:

a. Define O, Ω, and Θ notations in simple terms.


b. Explain what O(n²) time complexity implies for large datasets and how it differs
from O(n).
c. Given the following code snippet, find the time complexity using Big-O notation:

#include <stdio.h>

int main()

{
int n = 5;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
printf("%d %d\n", i, j);
}
}
return 0;
}

5. A system stores IDs of students in an array and prints each ID.

Prof. P. B. Dhanwate Page 2


Based on this scenario, answer the following questions:

a. Define time complexity and space complexity.


b. Explain why analyzing space complexity is important for large datasets.
c. Find time and space complexity of the following code snippet:
#include <stdio.h>

int main() {
int arr[5] = {1, 2, 3, 4, 5};
for(int i = 0; i < 5; i++) {
printf("%d\n", arr[i]);
}
return 0;
}

6. You want to find the largest number in a list of n numbers.

Based on this scenario, answer the following questions:

a. Define an algorithm and give one real-life example.


b. Explain how the number of comparisons affects the time complexity of finding the
largest number.
c. Given the list [10, 25, 5, 40], write pseudo-code to find the largest number
and calculate the number of comparisons.

7. An online store wants to sort products in two different ways:

 Method A: A simple sorting algorithm that compares each product with every other
product (O(n²)).
 Method B: A more efficient algorithm that splits and merges product lists (O(n log
n)).

The number of products in the store keeps increasing.

a. Define O(n²) and O(n log n) time complexities in simple terms.

Prof. P. B. Dhanwate Page 3


b. Explain how the time required to sort products increases for each method
when the number of products doubles from n to 2n.

8. A library keeps a list of all book titles. The number of books increases every month.
a. Define “order of growth” with respect to the number of books.
b. Explain how a linear search’s performance changes as the number of books
doubles.
c. If there are n books, describe how the time to find one book grows when n
increases.

9. A company keeps employee records in an array. As the company hires more


employees, the array grows.

Questions:

a. What is “space complexity” and why is it important when the number of


employees increases?
b. Explain how adding more employees affects memory usage.
c. If the number of employees doubles, how does the space required for storing
their records change?
d. Which method grows slower as n increases? Why is it better for large
datasets?

Prof. P. B. Dhanwate Page 4

You might also like