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.
Sorry, I didn't get the question.
The mention is "A valley is a sequence of consecutive steps below sea level,"
Considering String "DUDDDUUDUU", I see only one conecutive substring with D's. So, I am expecting the answer to be 1. How come the original answer is 2. Please help
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 →
Sorry, I didn't get the question. The mention is "A valley is a sequence of consecutive steps below sea level,"
Considering String "DUDDDUUDUU", I see only one conecutive substring with D's. So, I am expecting the answer to be 1. How come the original answer is 2. Please help