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.
Phrase "unordered anagrammatic pair" appears only in "Ouput Format" section, which you can (most of the time) just skip assuming you implement the provided code template. The problem definition in the first paragraph is normative.
"Unordered pair" just means that pair is expressed as {a, b}, not (a, b), i. e. the order does not matter. (1, 2) and (2, 1) are two different pairs (size of set { (1, 2), (2, 1) } is 2), while {1, 2} and {2, 1} are just two ways to write the same pair (size of set { {1, 2}, {2, 1} } is 1.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Anagrams
You are viewing a single comment's thread. Return to all comments →
Phrase "unordered anagrammatic pair" appears only in "Ouput Format" section, which you can (most of the time) just skip assuming you implement the provided code template. The problem definition in the first paragraph is normative.
"Unordered pair" just means that pair is expressed as {a, b}, not (a, b), i. e. the order does not matter. (1, 2) and (2, 1) are two different pairs (size of set { (1, 2), (2, 1) } is 2), while {1, 2} and {2, 1} are just two ways to write the same pair (size of set { {1, 2}, {2, 1} } is 1.