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.
How could the editorial solve the problem with cities={2, 3} and roads={{1, 2, 1}, {1, 3, 3}, {2, 4, 2}, {3, 4, 4}}? It's a 4-node graph connected in a circle. The editorial would return 20-9=11 instead of the expected result of 4?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Jeanie's Route
You are viewing a single comment's thread. Return to all comments →
How could the editorial solve the problem with cities={2, 3} and roads={{1, 2, 1}, {1, 3, 3}, {2, 4, 2}, {3, 4, 4}}? It's a 4-node graph connected in a circle. The editorial would return 20-9=11 instead of the expected result of 4?