DS Projects Review Report 1
DS Projects Review Report 1
Unit- I Projects:
Develop a program that checks whether an input string of parentheses (which can include (), {}, and []) is balanced or not. A string is considered balanced if
each opening parenthesis has a corresponding closing parenthesis and the pairs are properly nested.
Problem Description:
Input:
Output:
A boolean value or a message indicating whether the input string is balanced.
Requirements:
Detailed Steps:
Example:
Develop a Student Record Management System using a singly linked list in C. The system should manage student records, including adding, deleting,
searching, and displaying student records.
Problem Description:
The system will use a singly linked list to store and manage student records. Each record includes a student's ID, name, and grades. The program should
provide functionalities to add new records, delete existing records, search for records by student ID, and display all records.
Functional Requirements:
1. Add Student Record: Add a new student record to the linked list.
2. Delete Student Record: Delete a student record from the linked list by student ID.
3. Search Student Record: Search for a student record by student ID.
4. Display All Records: Display all student records in the linked list.
5. Exit: Exit the system.
Data Structures:
Node: Define a structure to represent a node in the linked list, which includes fields for student ID, name, grades, and a pointer to the next node.
Input:
Output:
Develop a simulation of the "Hot Potato" game using a queue data structure in C. In this game, players pass a "hot potato" around in a circle. After a certain
number of passes, the player holding the potato is eliminated. The game continues until only one player is left.
Problem Description:
The "Hot Potato" game involves a group of players sitting in a circle and passing an imaginary potato. After a predetermined number of passes, the player
holding the potato is removed from the circle. The game continues until only one player remains.
Functional Requirements:
Data Structures:
Input:
Output:
Sequence of eliminations.
Develop a program to solve the Tower of Hanoi puzzle using stacks to simulate the rods and disks. The program should move all disks from the source rod to
the destination rod following the puzzle's rules.
Problem Description:
The Tower of Hanoi is a classic problem involving three rods and a number of disks of different sizes that can slide onto any rod. The puzzle starts with the
disks neatly stacked in ascending order of size on one rod, the smallest at the top, making a conical shape.
Rules:
Input:
Number of disks, n
Output:
Sequence of moves required to solve the puzzle, where each move is represented as a transfer of a disk from one rod to another (e.g., "Move disk 1
from rod A to rod B").
Requirements:
Detailed Steps:
1. Initialize Stacks: Create three stacks representing the rods: source, auxiliary, and destination. Initialize the source rod with disks in ascending order of
size, with the largest disk at the bottom.
2. Recursive Function: Implement a recursive function solveHanoi(n, source, auxiliary, destination):
o Base Case: If n=1n = 1n=1, move the disk directly from the source to the destination.
o Recursive Case:
Move n−1n-1n−1 disks from the source rod to the auxiliary rod using the destination rod.
Move the nthn^{th}nth disk from the source rod to the destination rod.
Move the n−1n-1n−1 disks from the auxiliary rod to the destination rod using the source rod.
3. Main Function: In the main function, prompt the user for the number of disks, initialize the stacks, and call the recursive function.
4. Display Moves: Print each move in the format "Move disk X from rod Y to rod Z".
Example:
For n=3
Develop a Restaurant Order Management System using the queue data structure in C to manage and process customer orders efficiently. The system should
handle the addition of new orders, processing of existing orders, and display the current order queue.
Problem Description:
A restaurant receives customer orders that need to be managed in the order they are received. The system should use a queue to keep track of these orders. Each
order includes details such as the order number, customer name, and items ordered.
Functional Requirements:
Data Structures:
Queue: Use a circular queue to manage the orders. Each element in the queue represents an order.
Order: Define a structure to represent an order with fields for order number, customer name, and items ordered.
Input:
Order details including order number, customer name, and items ordered.
Output:
Unit- II Projects:
The Student Gradebook is a Python application designed to manage and organize student grades for various subjects. It provides functionalities to add new
students, record grades, calculate averages, and display student details. This project aims to utilize dictionaries in Python to efficiently store and manipulate
student data.
Problem Description:
The Student Gradebook application serves as a digital gradebook for teachers or educators to manage student grades. It allows them to keep track of individual
student performance across different subjects and provides insights into overall academic progress. The application offers a user-friendly interface for
performing essential gradebook operations.
Functional Requirements:
1. Add Student: Allow users to add new students to the gradebook by providing their names.
2. Add Grades: Enable users to record grades for each student in various subjects.
3. Calculate Average: Provide the functionality to calculate the average grade for a specific student.
4. Display Student Details: Allow users to view the detailed grades of a particular student, including grades for all subjects.
5. Display Gradebook: Provide an option to display the entire gradebook, showing all students and their respective grades.
Implementation Details:
1. Initialization:
o Initialize an empty dictionary named gradebook to store student grades. Each key-value pair in the dictionary represents a student's name
(key) and their corresponding grades (value).
2. Add Student:
o Implement the add_student function to add a new student to the gradebook. If the student's name already exists in the gradebook, display a
message indicating that the student already exists; otherwise, add the student to the gradebook.
3. Add Grades:
o Implement the add_grades function to record grades for a specific student in various subjects. The function updates the grades for the
specified student in the gradebook.
4. Calculate Average:
o Implement the calculate_average function to calculate the average grade for a particular student. The function retrieves the grades of the
specified student from the gradebook, calculates the average, and displays the result.
5. Display Student Details:
o Implement the display_student_details function to display detailed grades for a specific student. The function retrieves the grades of the
specified student from the gradebook and displays them along with the corresponding subjects.
6. Display Gradebook:
o Implement the display_gradebook function to display the entire gradebook. The function iterates through each student in the gradebook,
retrieves their grades, and displays them along with the corresponding subjects.
The Password Manager is a C application designed to securely store and manage user passwords using hashing techniques. It provides functionalities to add,
update, delete, and retrieve passwords for various online accounts. This project aims to demonstrate the importance of data security and user authentication in
managing sensitive information.
Problem Description:
In today's digital age, managing multiple passwords for different online accounts can be challenging and risky. Using the same password for multiple accounts
or choosing weak passwords can compromise user security. The Password Manager application addresses these concerns by securely storing passwords using
hashing techniques and providing a user-friendly interface for managing passwords.
Functional Requirements:
1. User Authentication: Implement user authentication to ensure that only authorized users can access the password manager. Users must provide a
master password to unlock the password manager.
2. Add Password: Allow users to add new passwords for online accounts by providing details such as account name, username, and password.
3. Update Password: Provide the functionality to update existing passwords for accounts.
4. Delete Password: Allow users to delete passwords for accounts they no longer use.
5. Retrieve Password: Enable users to retrieve passwords for accounts when needed.
6. Secure Storage: Ensure that passwords are securely stored using hashing techniques to protect them from unauthorized access.
Implementation Details:
1. User Authentication:
o Implement a login system where users must enter a master password to access the password manager.
o Use hashing techniques such as SHA-256 to securely store and verify the master password.
2. Password Management:
o Define a data structure (e.g., PasswordEntry) to represent a password entry, including attributes such as account name, username, and
hashed password.
o Use a data structure such as an array or linked list to store multiple password entries.
3. Add Password:
o Implement a function to add new passwords to the password manager.
o Prompt users to enter details such as account name, username, and password.
o Hash the password using a secure hashing algorithm before storing it in memory.
4. Update Password:
o Provide an option for users to update existing passwords for accounts.
o Prompt users to enter the account name whose password they want to update.
o Hash the new password before updating it in memory.
5. Delete Password:
o Allow users to delete passwords for accounts they no longer need.
o Prompt users to enter the account name whose password they want to delete.
o Remove the corresponding password entry from the password manager.
6. Retrieve Password:
o Implement a function to retrieve passwords for accounts.
o Prompt users to enter the account name for which they want to retrieve the password.
o Display the username and decrypted password (if needed) for the specified account.
The Game Score Tracker is a C application designed to manage and track the scores of players in various games. It allows users to add players, update scores,
display scores, and maintain a leaderboard. This project provides a practical application of using data structures, file handling, and algorithms to manage and
display player scores efficiently.
Problem Description:
In many games, keeping track of player scores and maintaining a leaderboard is essential. This project aims to create an application that can efficiently manage
scores for multiple players, update their scores as needed, and display the current standings. The application should be user-friendly and allow for easy
manipulation of the score data.
Functional Requirements:
1. Add Player: Allow users to add new players to the score tracker by providing player names and initializing their scores.
2. Update Score: Enable users to update the scores of existing players.
3. Display Scores: Display the scores of all players.
4. Leaderboard: Display the leaderboard with players ranked according to their scores.
5. Save and Load: Save the current state of the game scores to a file and load the scores from a file to maintain persistence.
Implementation Details:
1. Data Structure:
o Define a structure Player to represent a player, including attributes such as name and score.
o Use an array of Player structures or a linked list to store multiple players.
2. Add Player:
o Implement a function to add new players to the score tracker.
o Prompt users to enter player names and initialize their scores to zero.
3. Update Score:
o Provide a function to update the scores of existing players.
o Prompt users to enter the player name and the score to be added to or subtracted from the current score.
4. Display Scores:
o Implement a function to display the scores of all players in a readable format.
5. Leaderboard:
o Implement a function to display a sorted leaderboard, ranking players according to their scores.
The Contact Management System is a C application designed to manage personal contacts. It allows users to add, update, delete, and display contact
information such as name, phone number, and email address. Additionally, it can save the contacts to a file and load them from a file to maintain data
persistence.
Problem Description:
Managing personal contacts can become cumbersome without a proper system. This project aims to create a user-friendly application to store, update, and
manage contact information efficiently. The application provides an interface to handle contact data and ensures data is stored securely for future use.
Functional Requirements:
1. Add Contact: Allow users to add new contacts by providing name, phone number, and email address.
2. Update Contact: Enable users to update existing contact information.
3. Delete Contact: Allow users to delete contacts.
4. Display Contacts: Display all stored contacts in a readable format.
5. Save Contacts: Save the current state of contacts to a file.
6. Load Contacts: Load contacts from a file to restore the previous state.
Implementation Details:
1. Data Structure:
o Define a structure Contact to represent a contact, including attributes such as name, phone number, and email address.
o Use an array of Contact structures to store multiple contacts.
2. Add Contact:
o Implement a function to add new contacts to the contact list.
o Prompt users to enter contact details such as name, phone number, and email address.
3. Update Contact:
o Provide a function to update existing contacts.
o Prompt users to enter the contact name and the new details to update.
4. Delete Contact:
o Allow users to delete contacts from the contact list.
o Prompt users to enter the contact name to be deleted.
5. Display Contacts:
o Implement a function to display all stored contacts in a readable format.
6. Save and Load:
o Use file handling functions (fopen, fwrite, fread, fclose) to save the current state of contacts to a file.
o Provide a function to load contacts from a file to restore the previous state
An Expression Tree is a binary tree used to represent expressions in a natural and efficient way. This project aims to create an expression tree for a given
arithmetic expression and evaluate the expression using the tree.
Problem Description:
Arithmetic expressions, such as "3 + 5 * (2 - 4)", can be represented as trees where operators are internal nodes, and operands are leaf nodes. This project
involves constructing an expression tree for a given arithmetic expression and evaluating the expression using the tree structure.
Functional Requirements:
1. Expression Tree Construction: Construct an expression tree from a given arithmetic expression.
2. Expression Evaluation: Evaluate the arithmetic expression using the expression tree.
Implementation Details:
1. Data Structure:
o Define a binary tree node structure that includes data and pointers to left and right children.
o Use this structure to represent the expression tree.
2. Expression Tree Construction:
o Parse the arithmetic expression into tokens (operands and operators).
o Use a stack to build the expression tree iteratively based on the tokens.
o Push operands onto the stack and create new nodes for operators, linking them to their corresponding operands.
3. Expression Evaluation:
o Traverse the expression tree recursively.
o When encountering an operator node, evaluate its left and right subtrees recursively and apply the operator to the results.
o When encountering an operand node, return its value.
The Binary Indexed Tree (BIT), also known as the Fenwick Tree, is a data structure used to efficiently perform cumulative sum queries and update individual
elements in an array. This project aims to implement a Binary Indexed Tree and use it to perform range sum queries and updates.
Problem Description:
Given an array of integers, the Binary Indexed Tree allows efficient computation of the cumulative sum of elements in a given range and updating individual
elements in the array. This project involves implementing a Binary Indexed Tree data structure and using it to perform range sum queries and updates on an
array.
Functional Requirements:
1. Binary Indexed Tree Construction: Construct a Binary Indexed Tree from a given array of integers.
2. Range Sum Query: Compute the cumulative sum of elements in a given range of the array.
3. Update Element: Update the value of an element in the array and reflect the change in the Binary Indexed Tree.
Implementation Details:
1. Data Structure:
o Define an array to store the Binary Indexed Tree.
o Each element in the Binary Indexed Tree represents the sum of a range of elements in the original array.
2. Binary Indexed Tree Construction:
o Initialize the Binary Indexed Tree array with zeros.
o Perform updates on the Binary Indexed Tree array to reflect the cumulative sum of elements in the original array.
3. Range Sum Query:
o Compute the cumulative sum of elements in a given range by traversing the Binary Indexed Tree array.
o Use the prefix sum property of the Binary Indexed Tree to efficiently compute the range sum.
4. Update Element:
o Update the value of an element in the original array and reflect the change in the Binary Indexed Tree array.
o Update the Binary Indexed Tree array to maintain the cumulative sum property.
The objective of this project is to implement a priority queue using a binary heap data structure. Priority queues are data structures that store elements along
with their priorities, allowing efficient retrieval of the element with the highest priority.
Problem Description:
A priority queue is a collection of elements where each element has an associated priority. The priority queue supports two main operations: insertion (enqueue)
and deletion of the element with the highest priority (dequeue). In this project, we will implement a priority queue using a binary heap, a complete binary tree
where the priority of each parent node is greater than or equal to the priority of its children.
Functional Requirements:
1. Insertion (Enqueue):
o Add an element to the priority queue with its associated priority.
o Ensure that the binary heap property is maintained after insertion by percolating the newly inserted element up the tree if necessary.
2. Deletion (Dequeue):
o Remove and return the element with the highest priority from the priority queue.
o Ensure that the binary heap property is maintained after deletion by percolating the new root down the tree if necessary.
3. Peek:
o View the element with the highest priority without removing it from the priority queue.
Implementation Details:
4 File system:
Implement a file system using a tree data structure, where directories are represented as nodes and files are represented as leaves. This project can involve
operations like file creation, deletion, navigation, and searching.
The objective of this project is to implement a simple guessing game where the computer guesses a number that the player is thinking of using a binary search
tree.
Problem Description:
In this game, the computer will try to guess the number that the player is thinking of by asking a series of yes/no questions. The computer's questions will be
based on a binary search tree, where each node represents a question, and the left and right children represent the possible answers (yes or no). The player will
respond to the questions with 'yes' or 'no', guiding the computer to the correct guess.
Functional Requirements:
Once the computer reaches a leaf node, it makes a guess based on the question stored in that node.
The computer asks the player if its guess is correct.
If the player responds 'yes', the game ends, and the computer wins. If the player responds 'no', the game proceeds to the
next step.
Ask questions to the player based on the current node and navigate to the appropriate child node based on the player's
response.
3. Game Loop:
o Start the game loop where the computer continuously asks questions until it makes a guess.
o When the computer reaches a leaf node (i.e., a guess), it will display the guess and ask if it was correct.
4. Feedback Handling:
o Based on the player's response to the guess, update the binary search tree with a new question and answer.
o If the guess was correct, celebrate the victory. If not, learn from the player's response and improve future guesses.
Implementation Details:
Unit- IV Projects:
3 Represent a maze as a graph and find the shortest path using BFS or DFS:
Develop a C program to represent a maze as a graph where each cell is a node and possible movements are edges. Also find
the shortest path from the starting point to the exit using BFS or DFS.
4
5
Unit- V Projects:
S. No. Project Description
1 the Boyer-Moore algorithm to search for a sequence pattern in a given main string:
Develop a C program to implement the Boyer-Moore algorithm to search for a sequence pattern in a given main string.
2 the Brute Force algorithm to find all occurrences of a pattern in a given text:
Develop a C program to implement the Brute Force algorithm to find all occurrences of a pattern in a given text.
3 construct a Suffix Trie for a given text and find all occurrences of a substring within the
text
Develop a C program to construct a Suffix Trie for a given text and find all occurrences of a substring within the text.
4
5