We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For those who are using a priority queue (or any array of fixed size) with adjancency list, and are getting segmentation error on test 5 and 6, try changing the bounds to n(n - 1)/2 + 1. In the test cases the size of priority queue exceeds the number of edges.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Prim's (MST) : Special Subtree
You are viewing a single comment's thread. Return to all comments →
For those who are using a priority queue (or any array of fixed size) with adjancency list, and are getting segmentation error on test 5 and 6, try changing the bounds to n(n - 1)/2 + 1. In the test cases the size of priority queue exceeds the number of edges.