Skip to content

Commit 62ffa3d

Browse files
committed
replace size_t
1 parent dedfb79 commit 62ffa3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/leeter/max_profit_122.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Solution {
55
public:
66
int maxProfit122(vector<int>& prices) {
77
int maxProfit = 0;
8-
for (size_t i = 1; i < prices.size(); ++i) {
8+
for (int i = 1; i < prices.size(); ++i) {
99
if (prices[i] > prices[i - 1]) {
1010
maxProfit += prices[i] - prices[i - 1];
1111
}

0 commit comments

Comments
 (0)