Problem 88. It dseon't mettar waht oedrr the lrettes in a wrod are.

An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long as the first and last letters are unchanged.

Given a string of words s, take each word in turn and reverse the order of letters 2 through n-1, where n is the length of the words. Non-alphabetic characters should remain in place.

So if

 sIn = 'hello'


 sOut = 'hlleo'

And if

 sIn = 'This is the first time I have used MATLAB.'


 sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.'

Solution Stats

46.65% Correct | 53.35% Incorrect
Last Solution submitted on Jul 06, 2020

Problem Comments

Solution Comments

Problem Recent Solvers668

Suggested Problems

More from this Author95

Problem Tags