Find minimum covering substring | Google Interview Question