0
/ 20
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...
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.
Examples:
gHappy("xxggxx") -> true
gHappy("xxgxx") -> false
gHappy("xxggyygxx") -> false
Your feedback will appear here when you check your answer.