Whenever you're ready, walk me through how you'd approach this.
Write a function that reverses the order of words in a sentence and explain your approach as you solve the problem.
Clarify how you will handle leading, trailing, or repeated whitespace. State the expected time and space complexity and describe how you would validate the implementation with representative edge cases.