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.
- Counting Valleys
- Discussions
Counting Valleys
Counting Valleys
Sort by
recency
|
193 Discussions
|
Please Login in order to post a comment
Using Python:
This is my java code which is easy to understand.
My Java solution:
My Java solution:
public static int countingValleys(int steps, String path) { int currentLevel = 0; char down = 'D'; int numberOfValleys = 0;