0% found this document useful (0 votes)
9 views1 page

C++ Data Structures Assignment Guide

The document is an assignment for 2nd year Software Engineering students at Wachemo University, focusing on Data Structures and Algorithms using C++. It includes tasks such as implementing a circular linked list, converting expressions between infix, postfix, and prefix, evaluating expressions, and performing BFS and DFS on directed graphs. Each task requires the use of menus for user operation selection and proper input validation.

Uploaded by

sitotawchannel
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)
9 views1 page

C++ Data Structures Assignment Guide

The document is an assignment for 2nd year Software Engineering students at Wachemo University, focusing on Data Structures and Algorithms using C++. It includes tasks such as implementing a circular linked list, converting expressions between infix, postfix, and prefix, evaluating expressions, and performing BFS and DFS on directed graphs. Each task requires the use of menus for user operation selection and proper input validation.

Uploaded by

sitotawchannel
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

Wachemo University

College of Engineering and Technology


Department of Software Engineering
Assignment of Data Structure and Algorithms
Target Group 2nd Year Software Engineering Student Max Mark: - 20%
1. Write a C++ program to implement a circular linked list. The program should include the
following operations:
 Insert a node at the beginning.  Delete a node from any specified
 Insert a node at any specified position.
position.  Delete a node from the end.
 Insert a node at the end.  Display the circular linked list.
 Delete a node from the beginning.  Allow the user to choose the
operation via a menu.

2. Write a single C++ program that can:


 Convert infix to postfix.
 Convert postfix back to infix.
 Allow the user to choose the operation via a menu.
3. Write a single C++ program that can:
 Convert infix to prefix.
 Convert prefix back to infix.
 Allow the user to choose the operation via a menu.
4. Write a C++ program to evaluate a given postfix expression (e.g., 5 3 2 * +) and return the result.
 Assume the expression contains integers and basic operators (+, -, *, /).
 Validate the input and handle division by zero appropriately.
5. Write a C++ program to evaluate a given prefix expression (e.g., * +5 3 2) and return the result.
 Assume the expression contains integers and basic operators (+, -, *, /).
 Validate the input and handle division by zero appropriately.
6. Write a C++ program to delete a node in a binary search tree (BST) using the deletion by
merging method.
7. Write a C++ program to perform Breadth-First Search (BFS) on a directed graph. Implement the
following:
 Input the graph as an adjacency matrix.
 Perform BFS starting from a given source node.
 Print the nodes in the order they are visited.
8. Write a C++ program to perform Depth First Search (DFS) on a directed graph. Implement the
following:
 Input the graph as an adjacency matrix.
 Perform DFS starting from a given source node.
 Print the nodes in the order they are visited.

You might also like