diff --git a/Arrays/Buy And Sell Stocks 2.cpp b/Arrays/Buy And Sell Stocks 2.cpp new file mode 100644 index 0000000..a897897 --- /dev/null +++ b/Arrays/Buy And Sell Stocks 2.cpp @@ -0,0 +1,6 @@ +int maxProfit(vector& prices) { + int ans = 0; + for(int i = 1; i