public int maxSumofMaxLength(int[] array) {
		if (array == null || array.length <= 0)
			return 0;

		int maxLen = 1;
		int maxSum = array[0];

		int currentMaxLen = 1;
		int currentMaxSum = array[0];
		for (int i = 1; i < array.length; i++) {
			if (array[i] > array[i - 1]) {
				currentMaxLen++;
				currentMaxSum += array[i];
				if (currentMaxLen > maxLen
						|| (currentMaxLen == maxLen && currentMaxSum > maxSum)) {
					maxLen = currentMaxLen;
					maxSum = currentMaxSum;
				}
			} else {
				currentMaxLen = 1;
				currentMaxSum = array[i];
			}
		}
		return maxSum;
	}