3 ms·
How do they remove elements from the first array? Suck it and do O(N), or is it storing (value, deleted?) pairs?
by euyyn 10y ago
How do they remove elements from the first array? Suck it and do O(N), or is it storing (value, deleted?) pairs?
- brianwawok 10y agoLook at the index as given by the hash?
- euyyn 10y agoOh, so as you iterate the array, look up the value in the hash and if it's not there skip it? The downside is you end up accumulating dead values.