• + 1 comment

    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