EBK DATA STRUCTURES AND ALGORITHMS IN C
EBK DATA STRUCTURES AND ALGORITHMS IN C
4th Edition
ISBN: 9781285415017
Author: DROZDEK
Publisher: YUZU
Expert Solution & Answer
Book Icon
Chapter 3, Problem 19E

Explanation of Solution

Skip list:

  • A skip list is one that permits fast search in an ordered sequence of data.
  • The fast searching in the skip list is made possible by keeping a linked order of sub sequences, each skips over less data.
  • Searching begins in the sparest sub sequence up to two consecutive data have been found, one smaller and one equal to or larger than that data searched.
  • Over the linked order of sub sequences, two data can link to the data of the next sparest sub sequence, where operation of searching is going on until the full sequence is searched.
  • The data that are skipped over might be selected probabilistically.

Occurrence of worst case while searching a skip list:

  • When all the nodes are in the same level, there is an occurrence of worst case skip list.
  • Consider a skip list with all the elements. Since half of the list nodes resides on the level one, when every time a number generated randomly denotes the level one, the probability is (12).
  • Suppose the list has “n” elements, the probability for all the list nodes on the level one is (12)n, that drops quickly with the increase element number “n”

Blurred answer