Junior — Senior
Invert the order of words in the sentence
livecode
Task condition
Given an input string. You need to return a new string in which the sequence of words is in reverse order. Only one space is allowed between words, and any leading or trailing spaces should be removed.
class Solution {
public String reverseWords(String input) {
// TODO
}
}