Maximum Product Subarray and Reverse Words in a String