[英]Removing and adding elements to ConcurrentSkipListSet while iterating
[英]Complexity of ConcurrentSkipListSet to access the first and the last elements
根據我的理解, ConcurrentSkipListSet
的平均復雜度為O(log n),用於插入,搜索和刪除元素以及O(n)的最壞情況。 訪問第一個和最后一個元素怎么樣? 它是否低於日志? 我看到它保留了指向頭部的指針。 因此,我猜第一個元素是O(1)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.