finished maxProductSubArray and findNextGreaterNum