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

Java > String-2 > xyzMiddle
prev  |  next  |  chance

Given a string, does "xyz" appear in the middle of the string? To define middle, we'll say that the number of chars to the left and right of the "xyz" must differ by at most one. This problem is harder than it looks.

xyzMiddle("AAxyzBB") → true
xyzMiddle("AxyzBB") → true
xyzMiddle("AxyzBBB") → false

...Save, Compile, Run


Show output only (no red/green)

prev  |  next  |  chance   |  CodingBat  >  String-2

Forget It! -- delete my code for this problem

Progress graphs, just for fun:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Code Help and Videos

Misc Code Practice

242.0

Copyright Nick Parlante 2006-11 - privacy