The tag has no wiki summary.

learn more… | top users | synonyms (1)

1
vote
2answers
95 views

On-the-fly, random partition of a range of numbers [0,N] in groups of max M size

Suppose that you have a range of numbers from 0 to N that you want to randomly separate in groups of max M sequential numbers. This is easily done with a bitmap and a random number generator, but it ...
0
votes
0answers
183 views

Performance of a Skip-List algorithm

Here is a simple code for a randomized skip-list: Coin_Side flip() { if ( random() % 2 == 0 ) return HEADS; else return TAILS; } Note: random() returns an integer that uses ...