about | help | code help+videos | done | prefs |
countHi
Given a string, compute recursively (no loops) the number of times lowercase "hi" appears in the string. In this example, you will be writing a helper method. Do NOT use the substring method anywhere in your solution. Uncomment the code in the template and then implement the countHiHelper method. countHi("xxhixx") → 1 countHi("xhixhix") → 2 countHi("hi") → 1 countHi("xxhixx") → 1 countHi("xhixhix") → 2 countHi("hi") → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300
Copyright Nick Parlante 2017 - privacy