4 ms·
A set could have many implementations, it could be a HashSet and still have O(1) update/access. I was just referring to how using a hash map in this situation y
by leshow 8y ago
A set could have many implementations, it could be a HashSet and still have O(1) update/access. I was just referring to how using a hash map in this situation you actually don't need the value parameter-- so the correct data structure here is a set, not a map.