From: "R. Winder" Date: Mon Nov 18, 2002 9:40:35 PM US/Eastern Subject: another addition to the website I did a graphical representation for the skiplist in html that should prove useful to the students. If you'd put it up on the webpage, I'd appreciate it. I'm also emailing it to their class accounts. Thanks! Ransom Here's a representation of the sample input with some corrections to the sample output listed below. The format is similar to what you've seen in the project description. The header is to the far right (with 6 levels 5...0). Node levels are represented as [] and links are represented as ---- where the null links end in 1 User names are stored under the levels and this means they are on from the start time of that node to whatever node the level points. For the sake of space they have been abbreviated to the initial (Amy=A, Ben=B, etc.) The node start times are listed at the bottom of the skiplist. Initial L5:------[]----------[]-l U5 AF L4:------[]----------[]-l U4 L3:------[]----------[]--------------------------------------[]--------------[]-l U3: AB AEH L2:------[]------[]--[]--------------------------------------[]--------------[]-l U2 BG L1:------[]--[]--[]--[]--------------[]----------[]--[]------[]----------[]--[]--[]-l U1 G DG EGIJK EHIJK EHJK J A L0:--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]-l U0 F F EFI EI EIJ D C L KL K S: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 After Delete C and Delete H and Delete L L5:-----[]----------[]-l U5 AF L4:-----[]----------[]-l U4 L3:-----[]----------[]------------------------------[]--------------[]-l U3 AB AE L2:-----[]------[]--[]------------------------------[]--------------[]-l U2 BG L1:-----[]--[]--[]--[]--------------[]------[]--[]--[]------[]--[]--[]-l U1 G DG EGIJK EIJK EJK J A L0:-[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]-l U0 F F EFI EI EIJ D K S: 1 2 3 4 5 6 7 8 9 10 12 13 15 17 18 19 20 After Delete D L5:-----[]-l U5 L4:-----[]-l U4 L3:-----[]----------------------------------[]----------[]-l U3 A AE L2:-----[]------[]--------------------------[]----------[]-l U2 F B L1:-----[]--[]--[]--------------[]--[]--[]--[]------[]--[]--[]-l U1 G G EGIJK EIJK EJK J A L0:-[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]-l U0 F F EFI EI EIJ K S: 1 2 3 4 6 7 8 9 12 13 15 17 18 19 20 Corrections: 1) For UserTime Lil 9 11 Original Out: 3 user lists examined. Corrected Out: 5 user lists examined. 2) For the empty lines with seemingly no meaning: Remove them 3) I am not planning to test the "double insert" problem i.e. Insert Bob 23 43 Insert Bob 34 394 If I do reinsert someone I will call the delete command myself before I call the next insert for that person 4) For IsUserOnRange Cat 6 15 Original Out: 10 user lists examined. Corrected Out: 9 user lists examined.