✅ Simple Python Solution - Heap/hashmap - 7 lines - O(NlogN) time, O(N) space complexity
Basic idea:\n=========\nUse a combination of hashmaps and heap:\n- Heap hashmap - key is number, value is a heap to store the indexes and get the minimum index.
Basic idea:\n=========\nUse a combination of hashmaps and heap:\n- Heap hashmap - key is number, value is a heap to store the indexes and get the minimum index.\n- Array hashmap - key is index, value is number.\n\nArray hashmap is used to inform the heap hashmap if the ```index``` is still used for ```number```. If the ```index``` is no longer used, it will be ignored, and it will be popped from the heap.\n\n```\nclass NumberContainers:\n\n    def __init__(self):\n        self.arr = defaultdict(int)\n        self.heapht = defaultdict(list)\n\n    def change(self, index: int, number: int) -> None:\n        self.arr[index] = number        \n        heappush(self.heapht[number], index)\n\n    def find(self, number: int) -> int:\n        while len(self.heapht[number]) > 0 and self.arr[self.heapht[number][0]] != number:\n            heappop(self.heapht[number])\n        return self.heapht[number][0] if len(self.heapht[number]) > 0 else -1\n```
[]