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.
Are we supposed to assume that the input vertices will be consecutive? This is not specified in the description and makes a difference as to how the problem should be solved.
i.e. Is this a possible input:
1 2 r
3 4 b
2 3 r
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Kundu and Tree
You are viewing a single comment's thread. Return to all comments →
Are we supposed to assume that the input vertices will be consecutive? This is not specified in the description and makes a difference as to how the problem should be solved.
i.e. Is this a possible input:
1 2 r
3 4 b
2 3 r