title: how do I find the average in a Java LinkedList?
body: <p>I have a LinkedList and its elements are books. Books have their prices and a book can be added to the list repeatedly(un-ordered) and each time when they are added their prices may vary. Now I have to find the best selling book in the list by adding up all the different prices of the same book and divide it by the number of occurrence in the list. I am having trouble with the finding all the occurrence of the same book as they are un-ordered.</p>
  
  <p>can anyone give some ideas about this.</p>
  
  <p>thank you.</p>