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.
if you double check you are considering the boundings of the problem, if you do an else after just checking 1 letter you could have TTZZZPPP or whatever letter there , and that is not what the problem suggest you to check for, its always a good practice if someone asks for something in a problem to give the code back with the exact request.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Valleys
You are viewing a single comment's thread. Return to all comments →
if you double check you are considering the boundings of the problem, if you do an else after just checking 1 letter you could have TTZZZPPP or whatever letter there , and that is not what the problem suggest you to check for, its always a good practice if someone asks for something in a problem to give the code back with the exact request.