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.
The sample output in the description is wrong! The correct output is 3 and not 2.
The testcases contain the same example and there the output is correct.
Also the formulation " the maximum number of distinct skill set that can the people of country learn" is very misleading. What is meant "the maximum number of distinct skill that are known by at least one person". This means you must count people that already knew a skill at the beginning and thus did not learn anything during the transformations.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Training the army
You are viewing a single comment's thread. Return to all comments →
The sample output in the description is wrong! The correct output is 3 and not 2.
The testcases contain the same example and there the output is correct.
Also the formulation " the maximum number of distinct skill set that can the people of country learn" is very misleading. What is meant "the maximum number of distinct skill that are known by at least one person". This means you must count people that already knew a skill at the beginning and thus did not learn anything during the transformations.