Practice · 2 of 3
The climb log
CHALLENGE
Difficulty: intermediate+25 XP
A hike log is a list of strings made of 'U' (up) and 'D' (down) characters. Compute the **net altitude change** over the whole log (U counts +1, D counts -1, other characters ignored). Implement process(java.util.ArrayList<String> log) (0 for empty).
Example: ["UUD", "DUU"] → 4 ups, 2 downs → 2.
Press Submit to check your solution.
Back to lesson: Practice: Integration gauntlet