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

 

pais@kinetigram.com strings02 > S215_gHappy
prev  |  next  |  chance

APCS String 2, Problem 15. We'll say that a lowercase 'g' in a string is "happy" if there is another 'g' immediately to its left or right. Return true if all the g's in the given string are happy.


S215_gHappy("xxggxx") → true
S215_gHappy("xxgxx") → false
S215_gHappy("xxggyygxx") → false

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

public boolean S215_gHappy(String str) }

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: 200

Copyright Nick Parlante 2017 - privacy