Reverse String Word Wise In Java Leetcode