Unstub

Split and joinMedium

Reverse Words in a String

Return the words of s in reverse order, joined by single spaces, with no spaces at either end. s may have extra spaces anywhere.

Aim for O(n) time, O(n) spaceInspired by a classic interview problem ↗