C++ Approach || Faster than 97% || Easy to understand
\n\n\n    unordered_map,greater\>> pq; //for storing minimum index\n    unordered_map mp; //for storing the latest value at a particular index\n    NumberContai
\n\n\n    unordered_map<int,priority_queue<int,vector<int>,greater<int>>> pq; //for storing minimum index\n    unordered_map<int,int> mp; //for storing the latest value at a particular index\n    NumberContainers() {\n        \n    }\n    void change(int index, int number) {\n        \n        pq[number].push(index);\n        mp[index]=number;\n        \n    }\n    \n    int find(int number) {\n       while(!pq[number].empty())\n       {\n           if(mp[pq[number].top()]==number)\n               return pq[number].top();\n           else\n               pq[number].pop();\n       }\n        return -1;\n    }\n\t\n\t//Pls upvote if found helpful \uD83D\uDE0A
['C', 'Heap (Priority Queue)']