- This uses a
tailpointer that points to the top right$+\infty$ node. This is needed to create a new level in O(1). - This implementation assumes
sizeto be the unique number of data and not the total number of nodes in the skip list - The
levelsvariable is not 0-aligned. So in this case, an empty skip list haslevelsequal to 1 and not 0. - The
LEVEL_CAPvariable is set to 5 to reflect the csvistool's depiction - The add and remove algorithms are also based on the csvistool’s traversal of the skip list.
-
add(data)uses a public utility method calledcreateNewLevel()to handle resizing. -
remove(data)uses aremoveTopLevel()method to properly adjust the levels of the skip list if removing causes empty upper levels
skapoor68/SkipList
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|