about | help | code help+videos | done | prefs |
Write a method that returns the number of times the 'find' string occurs inside the 'orig' string. It is OK for occurrences to overlap. Please note that the 'find' string may be any length relative to the 'orig' string, which also may be any length. If the 'find' string is longer than the 'orig' string you must return zero for the number of occurrences since you can't fit a bigger string into a smaller one. The 'find' string will NOT be an empty string. cedarStringCount("abbabbabbabbabbabba", "abba") → 6 cedarStringCount("What we look for in a week we find weakly", "we") → 4 cedarStringCount("", "cow") → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 280
Copyright Nick Parlante 2017 - privacy