Skip to content

Commit 8c2011e

Browse files
authored
add comments
1 parent 6c7105c commit 8c2011e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

best-time-to-buy-and-sell-stock/Lustellz.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
function maxProfit(prices: number[]): number {
22

3+
// Runtime: 1ms
4+
// Memory: 66.23MB
35
let minPrice: number = prices[0];
46
let maxProfit: number = 0;
57

@@ -13,4 +15,7 @@ function maxProfit(prices: number[]): number {
1315
}
1416
}
1517
return maxProfit;
18+
19+
// What I was planning to do: Recursion
20+
// Result: referring other's code
1621
};

0 commit comments

Comments
 (0)