Xref: utzoo comp.sources.wanted:7416 alt.msdos.programmer:40 Path: utzoo!attcan!uunet!shelby!husc6!lotto From: lotto@midas.harvard.edu (Gerald I. Lotto) Newsgroups: comp.sources.wanted,alt.msdos.programmer Subject: Re: Need algorithm to scramble order of array Message-ID: Date: 17 May 89 15:25:04 GMT References: <3008@cps3xx.UUCP> Sender: news@husc6.harvard.edu Organization: Harvard Chemistry Dept., Harvard University Lines: 11 In-reply-to: usenet@cps3xx.UUCP's message of 17 May 89 13:55:19 GMT Any way you can randomize an array of indices will let you reorder the original array. One method that I like to use is to turn the array into 2 by n matrix. Fill array[n][2] with random numbers between 1 and m (m >> n), and sort "rows" by the "second column". Of course, it is much simpler in APL :-) -- Gerald Lotto - Harvard Chemistry Dept.