Easy
Collapse Whitespace
Replace every run of whitespace with a single space and strip the ends.
Input
One line.
Output
One line.
Sample 1
Input
too many spaces
Output
too many spaces
Sample 2
Input
ok
Output
ok
Output appears hereOne line.
One line.
too many spaces
too many spaces
ok
ok
Output appears here