Return a random object from the stream
top 5
44 months ago
Dmc binary stream

Suppose you have a stream object. This stream object ONLY has two methods. They are:
HasNext() - returns a boolean if there are more items in the stream
GetNext() - returns the next item in the stream
Given a stream such as this one, return a random object from it. No, the stream cannot be reset.


This challenge has received 29 submissions
Top 5 share $75
$15.00 Square pic hoa3 University of California at San Diego
$15.00 T University of Michigan
$15.00 R Rochester Institute of Technology
$15.00 Square pic a17f956af0cc98ef09029fe181a1d598 Wesleyan University
$15.00 Square pic befunky underpainting 1 University of Toronto
Represent MindSumo on Campus: Inspire and Empower your friends