Simple recursive Python3
Simple solution beats 34% on runtime and 75% on memory.\n\nclass RLEIterator:\n\n    def __init__(self, encoding: List[int]):\n        self.encoding = encoding\
Simple solution beats 34% on runtime and 75% on memory.\n```\nclass RLEIterator:\n\n    def __init__(self, encoding: List[int]):\n        self.encoding = encoding\n\n    def next(self, n: int) -> int:\n        \n        if self.encoding:\n            \n            count = self.encoding[0]\n            \n            if count >= n:\n\t\t\t\t# Partially exhaust and return the current value.\n                self.encoding[0] -= n\n                return self.encoding[1]\n            \n            # Exhaust all of current value and continue.\n            self.encoding = self.encoding[2:]\n            return self.next(n - count)\n            \n        return -1\n```
['Recursion', 'Python']