Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 703 Bytes

File metadata and controls

28 lines (24 loc) · 703 Bytes

Reverse words

Challenge Description:

Write a program which reverses the words in an input sentence.

Input sample:

The first argument is a file that contains multiple sentences, one per line. Empty lines are also possible.

For example:

Hello World
Hello CodeEval

Output sample:

Print to stdout each sentence with the reversed words in it, one per line. Empty lines in the input should be ignored. Ensure that there are no trailing empty spaces in each line you print.

For example:

World Hello
CodeEval Hello