C 0ms
\n    int i =0;\n    int min = prices[i];\n    int profit =0;\n    \n    for(i=1;i<pricesSize;i++){\n        if(prices[i]>min){\n            \n            profi
```\n    int i =0;\n    int min = prices[i];\n    int profit =0;\n    \n    for(i=1;i<pricesSize;i++){\n        if(prices[i]>min){\n            \n            profit = (prices[i]-min>=profit)?(prices[i]-min):profit;\n        }\n        else\n            min = prices[i];\n    \n    }\n    \n    \n    return profit;\n\n```
[]