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
Post a Comment