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
|
4160 Discussions
|
Please Login in order to post a comment
Great explanation of the Counting Valleys problem. I remember solving this when I was learning algorithms. By the way, if anyone is interested in the Free Fire Advance Server and wants to know how to register or get the latest updates, I’ve written a detailed guide here
` 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. **