Random path in a binary tree (source code)

= Random path in a binary tree

In a fair random root-to-leaf path, a specified leaf at depth $d$ is reached with probability $2^{-d}$.