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
Counting Valleys
Sort by
recency
|
4159 Discussions
|
Please Login in order to post a comment
` function countingValleys(steps: number, path: string): number {
}
**Logic to solve the problem is if the previous step was a "U" and the sealevel count becomes 0 it is a valley. **