The QBasic Forum      Other Subforums, Links and Downloads
  << Previous Topic | Next Topic >>Return to Index  

Choosing a random element from a list of unknown length

November 2 2009 at 3:11 PM
qbguy  (no login)

The numbers are in a data structure such that so you must process them sequentially (e.g. a singly linked list or being read from standard input), rather than taking the length and doing the obvious solution.

 
 Respond to this message   
AuthorReply
Anonymous
(no login)

(ROT13ed URL for solution [Scheme])

November 2 2009, 3:12 PM 

uggc://yvfc.cnfgrova.pbz/s32o0p869

 
 Respond to this message   
Current Topic - Choosing a random element from a list of unknown length
  << Previous Topic | Next Topic >>Return to Index