committing a solution for find-substring problem