Problem 31. Remove all the words that end with "ain"

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

32.41% Correct | 67.59% Incorrect
Last Solution submitted on Oct 04, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers2272

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

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

Start Hunting!