Is Java Treeset faster than arraylist? Want to be different

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

within the time of log (n).

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


search is a search operation, a known element, a search index. You're talking about known indexes, looking for elements, just the opposite

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43fa6-44a86.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43fa6-44a86.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?