Loading...
Given a sentence, reverse each word individually while keeping the word order the same.
Example:
Words are separated by single spaces. Preserve the original casing of each character.
hello world
olleh dlrow
Step 1: Split into words ["hello", "world"]
Step 2: Reverse each word "hello" → "olleh" "world" → "dlrow"
Step 3: Join with spaces "olleh dlrow"