public String reverseWords_II(String s) {
        if (s == null)
            return null;
        String[] arr = s.trim().split("\\s+");
        if (arr.length == 0)
            return "";
        int begin = 0, end = arr.length - 1;
        while (begin < end) {
            String temp = arr[begin];
            arr[begin++] = arr[end];
            arr[end--] = temp;
        }
        String res = "";
        for (int i = 0; i < arr.length - 1; ++i)
            res += arr[i] + " ";
        res += arr[arr.length - 1];
        s = res;
        return s;
    }