Simple Python Pointer Solution
\nclass RLEIterator:\n\n    def __init__(self, A: List[int]):\n        \n        self.values = A\n        self.i = 0\n\n    def next(self, n: int) -> int:\n\n  
```\nclass RLEIterator:\n\n    def __init__(self, A: List[int]):\n        \n        self.values = A\n        self.i = 0\n\n    def next(self, n: int) -> int:\n\n        while n>0 and self.i<len(self.values):\n            if n>self.values[self.i]:\n                n -= self.values[self.i]\n                self.i+=2\n            else:\n                self.values[self.i] -= n\n                return self.values[self.i+1]\n        return -1\n\n```\n
[]