Easy solution using hashing
\n\n# Code\n\nclass NumberContainers {\npublic:\n    unordered_map<int,set<int>>mp;\n    unordered_map<int,int>mp2;\n    NumberContainers() {\n        \n    }\n
\n\n# Code\n```\nclass NumberContainers {\npublic:\n    unordered_map<int,set<int>>mp;\n    unordered_map<int,int>mp2;\n    NumberContainers() {\n        \n    }\n    \n    void change(int index, int number) {\n        if(mp2.find(index)!=mp2.end()){\n            int val=mp2[index];\n            mp[val].erase(index);\n            if(!mp[val].size())mp.erase(val);\n        }\n        mp[number].insert(index);\n        mp2[index]=number;\n        \n    }\n    \n    int find(int number) {\n        if(mp.find(number)==mp.end())return -1;\n        auto it=mp[number].begin();\n        return *it;\n        \n    }\n};\n\n/**\n * Your NumberContainers object will be instantiated and called as such:\n * NumberContainers* obj = new NumberContainers();\n * obj->change(index,number);\n * int param_2 = obj->find(number);\n */\n```
['Hash Table', 'Ordered Set', 'C++']