PYTHON || O(N) || STACK
\nfrom collections import deque\nclass Solution:\n  def calPoints(self, operations):\n    stack= deque() \n    for op in operations:\n      if op=="C":\n       
```\nfrom collections import deque\nclass Solution:\n  def calPoints(self, operations):\n    stack= deque() \n    for op in operations:\n      if op=="C":\n        stack.pop()\n      elif op=="D":\n         stack.append(2*stack[-1])\n      elif op=="+":\n         stack.append(stack[-1]+stack[-2])\n      else:\n        stack.append(int(op))\n    return sum(stack)\n```
['Stack', 'Python']