Cody

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

Created by Cody Team in Cody Challenge

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

48.54% Correct | 51.46% Incorrect
Last solution submitted on Dec 17, 2018

Problem Comments

Solution Comments

Recent Solvers431

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!