Data structure enhancements for in-place sorting of a singly linked list
AssigneeDigital Equipment Corporation
InventorsClark E. Lubbers, Susan G. Elkington
Life of this patent
Estimating the term…
Loading patent…
AssigneeDigital Equipment Corporation
InventorsClark E. Lubbers, Susan G. Elkington
Estimating the term…
An apparatus and method for performing a skip list insertion sort on a singly linked list of elements is provided. Each element to be sorted includes a key, an element pointer in an element pointer field and a flag bit. Also provided is an indexed array of pointer arrays. If an element is to be inserted at a node level greater than zero, a free pointer array is allocated by storing an index corresponding to the allocated pointer array in the element pointer field and setting the corresponding flag bit. If a free pointer array is not available, then the node level of the element is forced to zero. If the level of the element is either assigned as or forced to zero, the flag bit is not set and the pointer array itself occupies the element pointer field as the element pointer instead of the index. Thus, the pointer to the element pointer field will point directly to the specified pointer array location without having to index into the array of pointer arrays. The skip list insertion search part of the sorting routine for each subsequent item to be inserted then tests the flag bit when traversing the list to determine whether the pointer array is in the array of pointer arrays or the element pointer field itself.
A digital computer system comprising:
A method of inserting an element in a linked list of elements, each element having an element pointer field for storing an element pointer and having an assigned key, the linked list being pointed to by a list head including a maximum allowed number of pointers, the pointers indexed from a lowest to a maximum number, the index corresponding to a level, the linked list having a current level no greater than the maximum allowed number of pointers, comprising the steps of:
Dependencies are inferred from the claim text.