Skip to content

Commit f31febd

Browse files
committed
Correct for loop case
1 parent d55dbba commit f31febd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cpp/maxValueProfit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Solution
4242

4343
auto investment = round[2];
4444

45-
for(int i=start; i<end; i++)
45+
for(int i=start; i<=end; i++)
4646
{
4747
balances[i-1] += investment;
4848
}

0 commit comments

Comments
 (0)