list - Java: Fastest structure to store and retrieve large number of strings -


i need create java structure store large number of string. need add new strings , check if string present... order of strings not important.

i don't know many java datatypes typical list, set , map, so... fastest datatype scenario? may treeset or there other i'm missing?

it depends on kind of access need.

  • sequential: linkedlist<string>
  • random: arraylist<string>
  • check presence: hashset<string> (this 1 looking according reqs)
  • check presence , sorted traversal: treeset<string>

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -