Available question text
Given a string of words separated by spaces, redistribute all spaces so that adjacent words have an equal (maximized) number of spaces between them and any leftover spaces are appended to the end; return the rearranged string of the same length.
Related questions
Continue with questions that share topics or the same question type.
- Rearrange Words in a Sentence
Coding
- Adding Spaces to a String
Coding
- Angle Between Hands of a Clock
Coding · Math
- Biggest Window Between Visits
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1592. Rearrange Spaces Between Words
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source