Pergunta de entrevista da empresa Verizon

Given an input string and a substring. Find the frequency of occurrences of a substring in a given string