Presentation is loading. Please wait.

Presentation is loading. Please wait.

COP3530- Data Structures Advanced Lists

Similar presentations


Presentation on theme: "COP3530- Data Structures Advanced Lists"— Presentation transcript:

1 COP3530- Data Structures Advanced Lists
Dr. Ron Eaglin

2 Objectives Describe Different List Implementations and Purposes
Circular Lists Skip Lists Self Organizing Lists Move to Front Method Transpose Method Count Method Ordering Method Sparse Tables

3 Circular List Tail

4 Circular List Can be implemented singly or doubly linked
Useful in application where “turns” are done in rotation Like a game where users take turns Used in time sharing problems (determine which user/process) has time allocation

5 Skip Lists

6 Skip Lists Nodes have pointers to multiple nodes further down the list
Simple sample design – add pointer at 1, 2, 4, 8, 16 All nodes have one pointer ½ nodes have 2 pointers ¼ nodes have 3 pointers Etc… Can create more efficient search algorithm

7 Sorted Skip List (Search Example)
Find G – 3 tries vs. 7 A E I C G B D F H A E I C G B D F H

8 Skip Lists Very similar conceptually to Binary Trees
Used in many database designs

9 Self Organizing Lists Move to Front – When the desired element is located it is moved to the beginning of the list. Transpose – When the desired element is located, swap it with its predecessor Count – Order the list by the number of times the element is accessed Other – use judgment, external algorithm to determine ordering method.

10 Advantages to Ordering
If most accessed element is near front of list – number of operations to find it are minimized.

11 Sparse Tables A sparse table is a table where most of the cells are empty Can be implemented as a Linked List where each element in the first Linked List is a Linked List

12 Sparse Table 1 2 3 4 5 6 7 8 9 A R N W C S Z F Q

13 Sparse Table L1 (A, R), L2 (N, W) , L3( C ), L5 (S, Z, A), L7(F), L8 (Q, C ), L9 (W) More efficient use of memory and resources

14 Objectives Describe Different List Implementations and Purposes
Circular Lists Skip Lists Self Organizing Lists Move to Front Method Transpose Method Count Method Ordering Method Sparse Tables


Download ppt "COP3530- Data Structures Advanced Lists"

Similar presentations


Ads by Google