Practice Problem

Reverse Words in a String

Difficulty: Medium

Reverse the order of words in a string, handling leading/trailing spaces and multiple spaces between words.