Skip to content

Commit 922de2a

Browse files
adds time and space complexity for #121
1 parent d773f19 commit 922de2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/BestTimeToBuyAndSellStock.java

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// https://leetcode.com/problems/best-time-to-buy-and-sell-stock
2+
// T: O(n)
3+
// S: O(1)
4+
15
public class BestTimeToBuyAndSellStock {
26
public int maxProfit(int[] prices) {
37
if (prices.length == 0) {

0 commit comments

Comments
 (0)