Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

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

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages