The level-zero successor of the predecessor is the first node whose value is at least In particular, the tail is never reported as a genuine member:The additional work after the skip list search is constant.
x. Thus only one equality test remains.def contains(x: Int): Boolean = {
if (x == Int.MinValue || x == Int.MaxValue) false
else {
val n = findPreds(x)(0).nexts(0)
(n ne tail) && n.datum == x
}
} Articles by others on the same topic
There are currently no matching articles.