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.
This is basically keeping the property of the_count: it is the number of possible interactions until ith component. Addition of each new component creates itself times the total number of nodes; as an addition to previous possibilities.
This changes half of the test cases.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Journey to the Moon
You are viewing a single comment's thread. Return to all comments →
The answer seems wrong.
after finding components and number on each component, with the same syntax used in the editorial soln, the final calculation should be:
This is basically keeping the property of the_count: it is the number of possible interactions until ith component. Addition of each new component creates itself times the total number of nodes; as an addition to previous possibilities.
This changes half of the test cases.