title: Java Big-O performance
body: <p>I have a question about the performance of my class project.</p>
  
  <p>I have about 5000 game objects formed from reading a text file.  I have a <code>Treemap</code> (called supertree) that holds as its nodes <code>Treemaps</code> (mini treemaps I guess). These <code>nodes/mini treemaps</code> are action, strategy, adventure, sports, gametitle, etc. Basically game genres and these mini trees will will hold game objects.   So the <code>supertree</code> itself will hold probably 8 <code>nodes/treemaps</code>.   </p>
  
  <p>When I insert a game object, it will determine which <code>mini tree</code> it will go to and put it in there.  For example if I insert the game <strong>Super Mario World</strong>, it will check which genre it is and see that it's <code>adventure</code>,so <strong>Super Mario World</strong> would be inserted into the <code>adventure</code> tree.</p>
  
  <p>So my question is what would be the performance if the question lists all the <code>action games</code>, since a Treemap get is O(log n)</p>
  
  <p>First at the super tree it will look for the <code>Action Node/Treemap</code>, which will take O(log n).</p>
  
  <p>Then once inside the <code>Action treemap</code>, it will do get for all elements which would be o(n log n) correct?</p>
  
  <p>So the total performance of <code>log n * (n * log n)</code> is correct?  Which is worst than <code>o(n)</code>.</p>
  
  <p>[edit]
  Hopefully this clarified my post a bit.</p>