Find the count of substring is present in string #HackerRank #CodingCamp

preview_player
Показать описание
In this challenge, the user enters a string and a substring. You have to print the number of times that the substring occurs in the given string. String traversal will take place from left to right, not from right to left.
Sample Input

ABCDCDC
CDC

Sample Output
2
Рекомендации по теме
Комментарии
Автор

Could you please share the code in Java?

suriya