← Microsoft questions
CodingReported in a candidate post, Jan 2025

Reverse Adjacent Word Pairs in String

Filed under Microsoft

Given a sentence string with multiple words separated by spaces, reverse each pair of adjacent words. Handle edge cases such as an odd total number of words where the final word remains in place…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.