Skip to content

i just needs to be from 0 to n-1 - #87

Open
fvdcx wants to merge 1 commit into
soulmachine:masterfrom
fvdcx:patch-1
Open

i just needs to be from 0 to n-1#87
fvdcx wants to merge 1 commit into
soulmachine:masterfrom
fvdcx:patch-1

Conversation

@fvdcx

@fvdcx fvdcx commented Jul 16, 2016

Copy link
Copy Markdown

for (int i = 0; i < n; ++i) max_profit = max(max_profit, f[i] + g[i]);
I think i would better range from 0 to n-1 [0, n-1)
Because the case i = 0 and the case i = n -1 are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant