SIMPLEST SOLUTION - C++
\nclass OrderedStream {\npublic:\n    vector<string> temporary;\n    int currentPosition = 0;\n    \n    OrderedStream(int n) {\n        temporary.resize(n);\n 
```\nclass OrderedStream {\npublic:\n    vector<string> temporary;\n    int currentPosition = 0;\n    \n    OrderedStream(int n) {\n        temporary.resize(n);\n    }\n    \n    vector<string> insert(int idKey, string value) {\n        vector<string> answer;\n        temporary[ idKey - 1 ] = value;\n        \n        while( currentPosition < temporary.size() && temporary[currentPosition] != "") {\n            answer.push_back(temporary[currentPosition]);\n            currentPosition++;\n        }\n        \n        return answer;\n    }\n};\n```
[]