3 ms·
Is it an array that models your problem efficiently, or is it "an n-dimensional data structure with O(1) lookups by index", of which an array is merely one impl
by jbri 16y ago
Is it an array that models your problem efficiently, or is it "an n-dimensional data structure with O(1) lookups by index", of which an array is merely one implementation?
- chancho 16y agoAre there any other such data structures besides arrays and hash tables? (That's only half-rhetorical. I'd love to hear about one.) If so, are you seriously suggesting that when an array fits the bill, we should stop and think "hmm... maybe another data structure would be a better container for this dense, contiguous set of integer keys"?