Pergunta de entrevista da empresa Commonwealth Bank of Australia

Remove a given substring from Input without using any inbuilt function