0% found this document useful (0 votes)
22 views2 pages

DSA Assignment 2

The assignment requires the implementation of various linked list structures for a data management application by Techsol Software Solutions. Tasks include managing customer records with a singly linked list, inventory tracking with a doubly linked list, and transaction history with a circular linked list, each accompanied by specific operations and discussions on their suitability. Submission includes code, algorithms, and explanations for the applications of each linked list type.

Uploaded by

40096
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

DSA Assignment 2

The assignment requires the implementation of various linked list structures for a data management application by Techsol Software Solutions. Tasks include managing customer records with a singly linked list, inventory tracking with a doubly linked list, and transaction history with a circular linked list, each accompanied by specific operations and discussions on their suitability. Submission includes code, algorithms, and explanations for the applications of each linked list type.

Uploaded by

40096
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Structures and Algorithms

(CSC232)
Assignment # 2

Instructor: Mr.Sheikh Abdul Wahab


Total Marks: 10

Answer the following question. [CLO2]

Techsol Software Solutions is developing a custom data management application for a client who
manages large-scale data, such as customer records, inventory, and transaction histories. The client
has requested an efficient and flexible system that uses various linked list structures for different
types of operations. As a software developer at XYZ Software Solutions, you are tasked with
building specific modules of the system using different types of linked lists based on the client's
requirements.

Scenario:

The client’s application requires different functionalities using the following linked list structures:

1. Customer Records Management: The system should use a singly linked list to manage
customer records. The operations include adding a new customer, removing a customer, and
searching for a customer’s details by their ID.
2. Inventory Tracking: The client wants to keep track of inventory items using a doubly
linked list. This will allow the client to efficiently traverse and update inventory items in
both directions (e.g., from the start of the list to the end or vice versa). Operations include
adding, deleting, and updating inventory items.
3. Transaction History Management: The application should use a circular linked list to
manage transaction history records for each customer. The circular structure is needed to
quickly access the most recent transaction and cycle through past transactions efficiently.

Assignment Tasks:

Task 1: Operations on Singly Linked List

● Implement a singly linked list to manage customer records.


● Perform the following operations:
a. Add a new customer to the list (insertion at the end).
b. Delete a customer from the list (given the customer ID).
c. Search for and display a customer’s details based on their ID.

Task 2: Application of Singly Linked List

● Explain how a singly linked list is suitable for managing customer records in this scenario.
Include a discussion of its advantages and limitations compared to other data structures.
Task 3: Operations on Doubly Linked List

● Implement a doubly linked list to manage the inventory.


● Perform the following operations:
a. Add an inventory item to the beginning of the list.
b. Remove an inventory item from the end of the list.
c. Update an existing inventory item’s details (given the item ID).

Task 4: Application of Doubly Linked List

● Discuss why a doubly linked list is beneficial for inventory management in this case.
Include scenarios where traversing the list in both directions would be useful.

Task 5: Operations on Circular Linked List

● Implement a circular linked list to manage transaction history records.


● Perform the following operations:
a. Add a new transaction record at the end of the circular list.
b. Display the most recent transaction.
c. Traverse through all past transactions and display them in order.

Task 6: Application of Circular Linked List

● Explain why a circular linked list is a good choice for managing the transaction history.
Discuss its benefits over singly and doubly linked lists for this specific application.

Submission Requirements:

● Submit your code along with algorithm for each implementation (Tasks 1, 3, and 5) in a
well-structured format.
● Provide explanations (Tasks 2, 4, and 6) in a separate document, discussing the suitability
of each linked list type for its respective application

You might also like