title: Time Complexity of Looping over an ArrayList and putting values in HashMap vs. just searching the ArrayList
body: <p>If you start with an <code>ArrayList&lt;Obj&gt;</code>, is there a time benefit to for-looping over the <code>ArrayList</code> and putting the values into a <code>HashMap</code> with a useful key for searching? Or does the looping of the <code>ArrayList</code> pretty much negate any benefit you would gain by putting it in the <code>HashMap</code>? </p>
  
  <p>I assume you'd still get a benefit if you were going to perform many searches on the new <code>HashMap</code>, but what about just one search? </p>