You are viewing a single comment's thread. Return to all comments →
it's wrong because for n = 6 and terrain = "uuddud", your code is giving output 1 but it should be 0 because valley is 0.
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 →
it's wrong because for n = 6 and terrain = "uuddud", your code is giving output 1 but it should be 0 because valley is 0.