Skip to content

Commit 921ee4e

Browse files
authored
Update maximum-profit-from-trading-stocks.cpp
1 parent 03b1c75 commit 921ee4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

C++/maximum-profit-from-trading-stocks.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Time: O(n)
2-
// Space: O(1)
1+
// Time: O(n * b)
2+
// Space: O(b)
33

44
// dp, optimized from solution2
55
class Solution {
@@ -18,8 +18,8 @@ class Solution {
1818
}
1919
};
2020

21-
// Time: O(n)
22-
// Space: O(1)
21+
// Time: O(n * b)
22+
// Space: O(b)
2323
// dp
2424
class Solution2 {
2525
public:

0 commit comments

Comments
 (0)