Skip to content

Latest commit

 

History

History

reversewords

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Reverse the Words in a String

Problem

Reverse the words in a string in-place using only O(1) memory. The string contains only ASCII characters and all characters other than the space character (ASCII 0x20) are considered word characters.

For example:

"Hello World from Rust!" => "Rust! from World Hello"

Source:

http://maxnoy.com/interviews.html