Company not specifiedSeptember 2026
Interview question
Given a string whose words are sequences of non-space characters, reverse the word order. Normalize leading, trailing and repeated spaces so the result has one space between words and no surrounding spaces.