Destroying Substrings
CodeChefOpen on judge ↗
As we all know, a substring is a contiguous subsequence of characters of a word. For example, the substrings of the word cat would be c,a,t,ca,at,cat. Given a String S composed of only lower case characters, and a substring X also of lower case characters, your job is to remove all occurrences of X from S . For example, if the String is “banana” and the substring is an, the resulting String wou
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start