The cost of stock on each day is given in an array A[] of size N. Find the maximum profit if a person can buy and then sell stock only one time. Input : 10 100 120 140 310 50 150 1 250 4 40
The cost of stock on each day is given in an array A[] of size N. Find the maximum profit if a person can buy and then sell stock only one time.
Input :
10
100 120 140 310 50 150 1 250 4 40