2 Pointer Big O(n) Easy Solution
python\nclass Solution:\n    def maxProfit(self, prices: List[int]) -> int:\n        max_profit, l = 0, 0\n\n        for r in range(1, len(prices)):\n          
```python\nclass Solution:\n    def maxProfit(self, prices: List[int]) -> int:\n        max_profit, l = 0, 0\n\n        for r in range(1, len(prices)):\n            \n            net = prices[r]-prices[l]\n            is_profit = net > 0\n            \n            if is_profit:\n                max_profit = max(max_profit, net)\n            else:\n                l = r\n\n        return max_profit\n```
['Python']