TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.67k stars 7.27k forks source link

Implement Kruskal’s MST Algorithm with Flexible Input Options #2707

Closed Meetmendapara09 closed 2 months ago

Meetmendapara09 commented 3 months ago

Implemented Kruskal’s Minimum Spanning Tree (MST) algorithm in C++. This update introduces a new implementation that includes:

The code now supports user interaction for dynamic input, provides clear error handling for invalid choices, and includes thorough documentation and comments for clarity.

Checklist

Notes: This update provides a complete implementation of Kruskal’s algorithm with options for both static and dynamic input, improving usability and flexibility for testing.