Skip to content

Sandheep-S-95/OptiRoute-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒณ OptiRoute Pro ๐Ÿงฎ

๐Ÿ“ Description

This C++ program implements Prim's algorithm to find the Minimum Spanning Tree (MST) of a given graph. It's perfect for network design, optimizing connections, or solving various graph-related problems!

๐Ÿš€ Features

  • ๐Ÿ“Š Build custom graphs with nodes and weighted edges
  • ๐Ÿ” Find the Minimum Spanning Tree using Prim's algorithm
  • ๐Ÿ“ˆ Calculate the total weight of the MST
  • ๐Ÿ–จ๏ธ Print the path coordinates and distances

๐Ÿ› ๏ธ Installation

  1. Ensure you have a C++ compiler installed (e.g., g++)
  2. Clone this repository:
    git clone https://github.com/Sandheep-S-95/OptiRoute-Pro.git
    
  3. Navigate to the project directory:
    cd OptiRoute-Pro
    
  4. Compile the program:
    g++ main.cpp
    

๐ŸŽฎ Usage

  1. Run the compiled program:

    ./main.cpp
    
  2. Follow the prompts to input your graph data:

    • Enter the number of nodes
    • Enter the names of each node
    • Enter the number of edges
    • For each edge, enter the source node, destination node, and weight
  3. The program will output the Minimum Spanning Tree and its total weight.

๐Ÿ“Š Example

Enter the number of nodes: 4
Enter node names:
A B C D
Enter the edges and weights (from to weight):
6
A B 5
B C 3
C D 2
D A 4
A C 7
B D 6
From: C To: D Distance: 2
From: B To: C Distance: 3
From: A To: B Distance: 5
Total Minimum Spanning Tree Weight: 10

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

๐Ÿ“œ License

This project is MIT licensed.

๐Ÿ‘ Acknowledgements

  • Thanks to all contributors and users of this project!
  • Inspired by graph theory and the beauty of efficient algorithms.

Happy Route optimizing! ๐ŸŒŸ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages