new paste || ipv4:js fail, n/a or broken? | ipv6:js fail, n/a or broken? ||

paste 35888/36e8 | 6 views since 2026-11-05 18:21:18 | text/plain | wrap || empty reply | copy reply | quote reply
js:(
# Rearrange Spaces Between Words (LeetCode 1592)

## Goal
Redistribute spaces evenly between words, extra at the end.

## Approach
Count spaces and words; gap = spaces // (words-1), handle the single-word case.

## Tip
Single-word input is the edge case to call out.

Prep notes shared by the Linkjob AI team. Practice explaining solutions out loud with [this tool](https://www.linkjob.ai/).