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

 

zbaharav@kehillah.org twelvedaysofap > howManyB_C
prev  |  next  |  chance

Given an input string, find how many times the string "B*C" appears with no "A" before it and with no "D" following it. The "*" in "B*C" can be any symbol.


howManyB_C("QB#C1") → 1
howManyB_C("AB3C1") → 0
howManyB_C("AB4C1 B2C ") → 1

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

public int howManyB_C(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: 100

Copyright Nick Parlante 2017 - privacy