Simple Java Solution | HashMap + TreeSet | Lazy Updates
\nclass NumberContainers {\n    HashMap<Integer, Integer> IndvalueStore;\n    HashMap<Integer, TreeSet<Integer>> valueIndStore;\n    public NumberContainers() {
```\nclass NumberContainers {\n    HashMap<Integer, Integer> IndvalueStore;\n    HashMap<Integer, TreeSet<Integer>> valueIndStore;\n    public NumberContainers() {\n        IndvalueStore = new HashMap();\n        valueIndStore = new HashMap();\n    }\n    \n    public void change(int index, int number) {\n        IndvalueStore.put(index, number);\n        valueIndStore.computeIfAbsent(number, s -> new TreeSet()).add(index);\n    }\n    \n    public int find(int number) {\n        if (valueIndStore.containsKey(number)) {\n            TreeSet<Integer> ts = valueIndStore.get(number);\n            while(ts.size() > 0) {\n                int x = ts.pollFirst();\n                if (IndvalueStore.get(x) == number) { // Check for outdated entry. If outdated ignore and don\'t add again.\n                    ts.add(x);\n                    return x;\n                }\n                \n            }\n        }\n        return -1;\n    }\n}\n```
['Tree', 'Java']