Skip to content

Commit f1e4119

Browse files
committed
Update solution.js
1 parent aad65b7 commit f1e4119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

121/solution.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const maxProfit = (prices) => {
2525

2626

2727
/**
28-
*
28+
2929
Space Complexity:
3030
The function uses a constant amount of extra space, regardless of the input size. It only declares a few variables (l, r, and max) to store indices and the maximum profit. Therefore, the space complexity is O(1), indicating constant space usage.
3131

0 commit comments

Comments
 (0)