id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > parkourDistance
prev  |  next  |  chance

Parkour players run routes through an urban environment. They can go North, South, East, or West. Each letter 'N', 'S', 'E', or 'W' in the string represents one movement in that direction. Other characters in the string represent pauses or other activities that do not involve a change in position. The total Parkour distance is simply the total number of movements made. Return the Parkour distance.


parkourDistance("NSESSSSEENW") → 11
parkourDistance("NN-E--") → 3
parkourDistance("EW/=-EE") → 4

...Save, Compile, Run (ctrl-enter)

public int parkourDistance(String route) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 240

Copyright Nick Parlante 2017 - privacy