[Haskell-cafe] Randomly balanced binary trees

Dominic Fox dominic.fox at ntlworld.com
Sun Jan 23 10:03:38 EST 2005

Some more code that might be of interest to someone. Based on a suggestion by 
Alistair Turnbull, I've written a Haskell implementation of a randomly 
balanced binary tree. This merges tree updates with a stream of random 
numbers, which are used to shuffle the order of nodes in the tree so that it 
remains balanced. The code is posted together with a short explanation here:


I would be especially interested in any suggestions relating to optimisation.


More information about the Haskell-Cafe mailing list