title: Hash table vs. Sorted Array - which to use?
body: <p>Suppose I have a set of data (unsorted) that I want to store for quick lookup. I don't know what the size is before I load the data and I should load it all at once so I can start performing lookups right away.</p>
  
  <p>In addition, at any time during program execution more data may be presented to me to be stored in the data structure I choose.</p>
  
  <p>Should I use a hash table or sorted array to store this data? Obviously a static hash table would require being made at runtime according to the size of data presented - would this be enough of a disadvantage that I should simply sort the data given to me, even though it would be O(NlogN) instead of O(N)? Or should I be considering some method of dynamic hashing?</p>
  
  <p><strong>Clarification</strong>: I need to load data of arbitrary size and then perform search and insertions on the data, with no clear order or idea of the amount of searching/inserting I'll have to do.</p>
  
  <p>I know that's really general...but what if I have to do more insertions after loading the data than searches? What about more searches than insertions?</p>