HomeAlgorithms & AISkip List Level-Height & Search-Cost Distribution

Skip List Level-Height & Search-Cost Distribution

Monte Carlo lab for skip lists: watch the geometric coin-flip distribution of node heights build a 3D lane-occupancy histogram, then measure real search cost against Pugh's theoretical bound as you tune the promotion probability.

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted
skip-list-probabilistic-data-structure ↗ Open standalone

A skip list balances itself purely by chance: every node's height comes from a run of biased coin flips, giving a geometric distribution that makes each express lane exponentially sparser than the one below it. This lab builds a real skip list over N sorted keys, draws every node's height from that coin-flip process, and renders the resulting lane-occupancy counts as a live 3D histogram next to the theoretical curve N·p^(k−1). A second Monte Carlo control runs genuine top-down searches against the built structure and reports the measured average comparison count against Pugh's theoretical estimate log(1/p)(N)/p, so you can see the probabilistic O(log n) guarantee hold up (or wobble) as you change p and N.

⚙ Under the hood

A Monte Carlo lab that builds a real skip list from coin-flip node heights, renders the resulting lane-occupancy histogram against its theoretical geometric-distribution curve, and measures actual search cost against Pugh's theoretical estimate.

skip listprobabilitydata structuresmonte carlogeometric distributionalgorithms

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)