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.
@nabila_ahmed Nice question, but by checking for the length of a string to determine the correct answer it makes it possible to pass the test(s) when in actuality the wrong string was created. Example: if the exepected string length is 4, baba passes as does bbaa. It also makes it tougher to debug a solution because you don't really know what the expected answer is.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Two Characters
You are viewing a single comment's thread. Return to all comments →
@nabila_ahmed Nice question, but by checking for the length of a string to determine the correct answer it makes it possible to pass the test(s) when in actuality the wrong string was created. Example: if the exepected string length is 4,
baba
passes as doesbbaa
. It also makes it tougher to debug a solution because you don't really know what the expected answer is.