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.
I have an issue with the problem description, as it is tailored to a specific solution. Not only having to print "the string being checked" instead of specifically the prefix or string that contains the prefix is inconsistent, but correct answers are marked as wrong.
For example, in the test case they show:
4
aab
aac
aacghgh
aabghgh
there are actually FOUR correct answers:
aab is a prefix of aabghgh and aac is a prefix of aacghgh. Since we can print any string of the prefix-prefixed pair, we could technically print any of these and be correct. HOWEVER, only BAD SET
aacghgh is correct, because they assume we will be solving the problem in a specific way.
Good problem but bad solution criteria, in my opinion.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
No Prefix Set
You are viewing a single comment's thread. Return to all comments →
I have an issue with the problem description, as it is tailored to a specific solution. Not only having to print "the string being checked" instead of specifically the prefix or string that contains the prefix is inconsistent, but correct answers are marked as wrong. For example, in the test case they show:
4 aab aac aacghgh aabghgh
there are actually FOUR correct answers: aab is a prefix of aabghgh and aac is a prefix of aacghgh. Since we can print any string of the prefix-prefixed pair, we could technically print any of these and be correct. HOWEVER, only BAD SET aacghgh is correct, because they assume we will be solving the problem in a specific way.
Good problem but bad solution criteria, in my opinion.