describe the insert method of the skiplist in pseudo code
p= skipsearch(k) q = insertafterabove(p, null, (k,v)) e = q.element()
describe in words the insertion of a skiplist
insert(x,o)
describe in words the removal method
to remove an entry x
describe the quad node
type of node storing:
element, above, below, prev and next
used to implement a skip list
What is the probability of getting i consecutive heads when flipping a coin?
1/2^i
Probable size of a skiplist?
n/2^i
expected space usage for a skiplist?
O(n)
What is the height of a skiplist?
O(log n)
search, insertion, and deletion runtime?
O(log n)