algorithm skipinsert( , )inputkey and value outputtopmost position of the item inserted in the skip list skipsearch(kq none { will represent top node in new item' toweri - repeat + if > then + {add new level to the skip listt next(ss insertafterabove(nones(-none){grow leftmost towerinsertafterabove(st(+none){grow rightmost towerwhile above(pis none do prev( {scan backward{jump up to higher levelp above(pq insertafterabove(pq(kv){increase height of new item' toweruntil coinflip(=tails + return code fragment insertion in skip list method coinflip(returns "headsor "tails"each with probability / instance variables nhand hold the number of entriesthe heightand the start node of the skip list figure insertion of an entry with key into the skip list of figure we assume that the random "coin flipsfor the new entry came up heads three times in rowfollowed by tails the positions visited are highlighted the positions inserted to hold the new entry are drawn with thick linesand the positions preceding them are flagged