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

 

zbaharav@kehillah.org qq > occurence
prev  |  next  |  chance

Given two input strings, str1 and str2, return the number of times str2 appears in str1.


occurence("go go", "go") → 2
occurence("Kehillah", "l") → 2
occurence("AP-CS-A", "K") → 0

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

public int occurence(String str1, String str2){ }

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

Copyright Nick Parlante 2017 - privacy