Re:Ask YC: Data structure or Algorithm selection for a problem?
by boucher on Thursday December 20, 2007 @03:19AM
(#91436)
Well, no, not always, always.
Use the data structure that makes the design more efficient. Clarity might be nice, but an O(n) solution is not acceptable when a reasonable O(log n) or O(1) solution exists.
Use the data structure that makes the design more efficient. Clarity might be nice, but an O(n) solution is not acceptable when a reasonable O(log n) or O(1) solution exists.