Robert Bosch Interview Question

Written test: Frequency of a substring in a string