Reverse sequence of words in a string preserving spaces
Filed under Bloomberg
The question
Reverse the sequence of words in a string where words are separated by any number of spaces, and preserve the exact number and order of spaces.
No write-up yet. Related questions below have one.
Related Bloomberg questions
Collected from public candidate posts and coding forums. Updated Nov 2026.