Memory leak risks are higher in java or C++?? Explain it.
Given a sentence and a word, remove all occurrences of the word in the sentence.
For example, removing “is” from the sentence “This is a boy.” becomes “Th a boy.”