diff --git a/stocks_Buy_And_Sell_Problem.cpp b/stocks_Buy_And_Sell_Problem.cpp new file mode 100644 index 0000000..54b228c --- /dev/null +++ b/stocks_Buy_And_Sell_Problem.cpp @@ -0,0 +1,26 @@ +#include + +using namespace std; + +int stocksProfit(int arr[],int n){ + int minPrice= INT_MAX; + int maxProfit = 0; + for(int i=0 ; i>n; + int arr[n]; + for(int i =0 ; i>arr[i]; + } + cout<<"Maximum Profit: "<