Grant Street Group interview question

Given a string, return all possible substrings along with each substring's frequency/count.