Given the string s1, return the string s2 with the target characters removed.

For example, given

 s1 = 'the main event'

your code would return

 s2 = 'the  event'

Note the 2 spaces between "main" and "event" Only the four letters in the word "main" were deleted.

Solution Stats

10527 Solutions

2638 Solvers

Last Solution submitted on Feb 19, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Group


Problem Recent Solvers2638

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!