Closed poshithNandyala closed 1 month ago
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that you star the repository and follow me in github,otherwise PR will not merged. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊
can you write the algo in same cpp file with explanation which you write in txt file.
I have added in-code explanations for Dijkstra's algorithm within the same CPP file. Please review the changes.
This pull request addresses issue #105 and provides an efficient solution to the Network Delay Time problem, implemented in C++. The problem involves determining the minimum time required for all nodes in a directed, weighted network graph to receive a signal sent from a specified starting node,
k
. If any nodes are unreachable, the solution returns-1
to indicate this.The approach uses Dijkstra's Algorithm for shortest-path computation, ensuring an optimal time complexity for large graphs by utilizing a min-heap (priority queue) to manage nodes in the order of their current shortest distance from the source node. This solution:
Summary of Changes
Additional Information
This solution provides clarity and efficiency in handling the Network Delay Time problem, offering robust performance for the upper bounds of constraints.