Close
Register
Close Window

Show Source |    | About   «  30.10. Lists   ::   Contents   ::   30.12. Binary Trees Part 1  »

30.11. SkipLists

30.11.1. SkipList Idea

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

30.11.2. SkipList Reality

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

30.11.3. Analysis

  • Best-case behavior is "balanced": \(\Theta(\log n)\) (like a BST).
  • Worst-case behavior: All nodes at the same level (regardless of what level): Effectively degenerates to a linked list (like a BST).
  • Reality: Its behavior is not so dependent on order of inserts as a BST. Its similar to what BST cost would be if we randomized the input order. A huge improvement in expected performance!

30.11.4. Programming Principles

  1. All container classes should be general.
  2. Any container class's initial state should be identical to its empty state.

   «  30.10. Lists   ::   Contents   ::   30.12. Binary Trees Part 1  »

nsf
Close Window