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.
It's not the single letter string test case which is failing for you. It's the other strings in the same test case. Your char arrays are all of length 100. Make them of length 101. If you get an input string of length 100, you will need an additional byte for storing '\0'.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Bigger is Greater
You are viewing a single comment's thread. Return to all comments →
It's not the single letter string test case which is failing for you. It's the other strings in the same test case. Your char arrays are all of length 100. Make them of length 101. If you get an input string of length 100, you will need an additional byte for storing '\0'.