Clean/Readable C++ optimal solution. :)
\nclass RLEIterator \n{\n    public:\n        RLEIterator(vector<int> &encoding) : m_encoding{encoding}\n        {\n        }\n\n        int next(int n) \n     
```\nclass RLEIterator \n{\n    public:\n        RLEIterator(vector<int> &encoding) : m_encoding{encoding}\n        {\n        }\n\n        int next(int n) \n        {\n            while (m_iterator < m_encoding.size())\n            {\n                if (m_encoding[m_iterator] >= n)\n                {\n                    m_encoding[m_iterator] -= n;\n                    return m_encoding[m_iterator + 1];\n                }\n                else\n                {\n                    n -= m_encoding[m_iterator];\n                    m_iterator += 2;\n                }\n            }\n            \n            return -1;\n        }\n    \n    private:\n        std::vector<int> &m_encoding;\n        int m_iterator{0};\n    \n};\n```
['C']