recently, when I looked at JCF, I found this sentence on the Internet. when searching a large amount of information, TreeSet is more efficient than ArrayList and can guarantee the completion of
Treeset is a tree structure. The search is O (log (n))
, but ArrayList is O (1). Obviously, this is fast
I don"t know where I understand it correctly