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'
then
sOut = 'hlleo'
And if
sIn = 'This is the first time I have used MATLAB.'
then
sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.'

Solution Stats

5025 Solutions

2161 Solvers

Last Solution submitted on Jul 29, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Group


Problem Recent Solvers2161

Problem Tags

Community Treasure Hunt

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

Start Hunting!