Insert(same as Unsorted Array Structure)–No loops, 6 memory accesses, O(1)•Fetch–The loop in the sequential search executes an average of n/2 times, with 3 memory accesses each time, O(n)•Delete–Loop in the sequential search executes an average of n/2 times, with 3 memory accesses each time, O(n)•Update–Combines a Delete and Insert Operation, 1.5n+6 memory accesses, O(n)•Average operation: 1.125n + 3 memory accesses, O(n)
Subscribe to view the full document.
25Density Of A Singly Linked List•Density = information bytes / total bytes–Information bytes = n * w•n is the number of nodes, w is the bytes per node–Overhead = 4(1 + 2 + 2n) bytes (for ref. variables)•4 bytes per variable * (Header + dummy node +linked nodes)•Density = n * w / (n * w + 4(1 + 2 + 2n) )= 1 / (1 + 12 / (n*w) + 8 / w)–As n gets large above approaches 1 / (1 + 8 / w)
26Variation In Density Of A Singly Linked List With Node WidthDensity of a Singly Linked Listfor n >= 100 nodes00.20.40.60.81020406080100Information bytes per node, wDensity