C++ Solution || HashMaps || Arrays✔✔
\n## MAPS\n\nclass OrderedStream {\npublic:\n    map<int,string> mp;\n    int count=1;\n    OrderedStream(int n) {\n        count=1;\n    }\n    vector<string> 
\n## MAPS\n```\nclass OrderedStream {\npublic:\n    map<int,string> mp;\n    int count=1;\n    OrderedStream(int n) {\n        count=1;\n    }\n    vector<string> insert(int idKey, string value) {\n        mp.insert({idKey,value});\n        vector<string> ans;\n        for (auto vl: mp){\n            if (vl.first==count){\n                count++;\n                ans.push_back(vl.second);\n            }\n        }\n        return ans;\n    }\n};\n\n/**\n * Your OrderedStream object will be instantiated and called as such:\n * OrderedStream* obj = new OrderedStream(n);\n * vector<string> param_1 = obj->insert(idKey,value);\n */\n```\n\n## ARRAYS\n```\nclass OrderedStream {\npublic:\n    string arr[1005];\n    int count=1; int n;\n    OrderedStream(int n) {\n        count=1;\n        for (int i=1; i<=n; i++)arr[i]="NULLSTRING";\n        this->n= n;\n    }\n    vector<string> insert(int idKey, string value) {\n        arr[idKey]= value;\n        vector<string> ans;\n        while (count<=n && arr[count]!= "NULLSTRING"){\n            ans.push_back(arr[count]);\n            count++;\n        }\n        return ans;\n    }\n};\n```
['Array', 'Hash Table', 'Design', 'Data Stream', 'C++']