Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finger Search [10 points] [2 A finger in a skiplist is an array that stores the sequence of nodes on a search path at which

image text in transcribed

Finger Search [10 points] [2 A finger in a skiplist is an array that stores the sequence of nodes on a search path at which the search path goes down. (The variable stack in the add(x) code on page 87 is a finger; the shaded nodes in Figure 4.3 show the contents of the finger.) One can think of a finger as pointing out the path to a node in the lowest list, L0. A finger search implements the find (x) operation using a finger, walking up the list using the finger until reaching a node u such that uxx and then performing a normal search for x starting from u. It is possible to prove that the expected number of steps required for a finger search is O(1+logr), where r is the number values in L0 between x and the value pointed to by the finger. Design, i.e. provide the necessary pseudo code for, a version of a skiplist that implements f ind (x) operations using an internal finger. This subclass stores a finger, which is then used so that every find (x) operation is implemented as a finger search. During each f ind (x) operation the finger is updated so that each f ind (x) operation uses, as a starting point, a finger that points to the result of the previous f ind (x) operation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

Timeline for progress report

Answered: 1 week ago