Anonymous user
Talk:Count occurrences of a substring: Difference between revisions
Talk:Count occurrences of a substring (view source)
Revision as of 18:33, 12 June 2012
, 11 years ago→More specific?: caseless and whitespace comments. -- ~~~~
(→More specific?: caseless and whitespace comments. -- ~~~~) |
|||
Line 13:
Yes, the problem is stated ambiguously and was probably inspired by some particular language's implementation of a built in function. It would be more appropriate to count all occurrences of a substring. Counting the maximum number of non-overlapping substrings can turn into a very complicated problem requiring backtracking.
: Yes, some languages' bif may treat it as caseless, still others may treat all whitespace equally (as blank or blanks). It would've been interesting to make a case-sensative and a caseless version. The whitespace issue can be more complicated. -- [[User:Gerard Schildberger|Gerard Schildberger]] 18:33, 12 June 2012 (UTC)
|