We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1684ab3 commit de1eea3Copy full SHA for de1eea3
maximum-product-subarray/README.md
@@ -0,0 +1,12 @@
1
+## Yet another [Maximum Subarray](../maximum-subarray)
2
+
3
+We cannot just drop negative histories this time, instead,
4
+They may grow into bigger positive numbers in the future.
5
6
+To make [Maximum Subarray](../maximum-subarray) works on this problem,
7
+just add a variable to remember the negative histories.
8
9
10
+When a negative number comes,
11
+the negative history may trun into a number greater than positive history.
12
+Swap the positive and negative histories.
0 commit comments