Random Number
Start Timer
0:00:00
Given a stream of numbers, select a random number from the stream with equal probability and space in selection.
Input:
def random_number(x, y=0, count=1):
pass
x
is the new value from the stream.y
is the previously selected value.count
is the size of the stream.
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments