diff --git a/cpp/0122 - Best Time to Buy And Sell Stock II.cpp b/cpp/0122 - Best Time to Buy And Sell Stock II.cpp new file mode 100644 index 000000000..7a94bd3c8 --- /dev/null +++ b/cpp/0122 - Best Time to Buy And Sell Stock II.cpp @@ -0,0 +1,13 @@ +class Solution { +public: + int maxProfit(vector& prices) { + int ans=0; + for(int i=0;i