Reverse Words in a String — November 6, 2026
Given an input string s, reverse the order of the words. Constraints: A word is defined as a sequence of nonspace characters. Words are separated by at least one space. The input string may contain leading or trailing spaces. Multiple spaces between two words should be reduced to a single space in t
