Simple Solution -w- Simple Explanation (C++) (Commented)
We use two maps, \nFirst map nums is like an array, which maps index to the values.\nSecond map indices, maps a certain value to the set of indexes where that v
We use two maps, \nFirst map `nums` is like an array, which maps index to the values.\nSecond map `indices`, maps a certain value to the set of indexes where that value is present.\nThe code is self-explanatory, as we simply have to update the values at both the maps when _change()_ is called.\n\n```\nclass NumberContainers \n{\n    \npublic:\n    \n    // Map to store the numbers at a particular index\n    // index -> number\n    unordered_map<int, int> nums;\n    \n    // Map which stores all indices of a given number\n    // number -> set of indices\n    unordered_map<int, set<int>> indices;\n\n    NumberContainers() \n    {\n    }\n    \n    void change(int index, int number) \n    {\n        // If number is already present at that index then\n        // delete the index from the index set of the (old) element\n        if(nums[index])\n            indices[nums[index]].erase(index);\n        \n        // Update the nums mapping\n        nums[index] = number;\n\n        // Update the indices mapping\n        indices[number].insert(index);\n    }\n    \n    int find(int number) \n    {\n        // If that number is present in the indices mapping and the first element is not zero\n        // Then return the first element of the set (as set is sorted, the first element will contain the smallest index)\n        if(indices.find(number) != indices.end())\n        {\n            if(*indices[number].begin() != 0)\n                return *indices[number].begin();\n        }\n        \n        return -1;\n    }\n};\n```
['C', 'C++']