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.
Hey, a bit late. There are still infinite number of paths because the constraint was that no two paths could have the same sequence of roads. This means that if you loop over it you get 3 more roads in the sequence and that counts it as different path.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Kingdom Connectivity
You are viewing a single comment's thread. Return to all comments →
Hey, a bit late. There are still infinite number of paths because the constraint was that no two paths could have the same sequence of roads. This means that if you loop over it you get 3 more roads in the sequence and that counts it as different path.