From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to shuffle/jumble letters of a given word? Date: Mon, 29 Jun 2015 11:04:55 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <24d183ce-77b6-4fe1-a95e-0ff5ef72c7bd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 29 Jun 2015 18:03:34 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="17206"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185rOpzW3CghKC/OL54ebWkkZ46pp/kFMs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:/ek1+YD6FZSj0ymXUM0M/b/FGw8= Xref: news.eternal-september.org comp.lang.ada:26544 Date: 2015-06-29T11:04:55-07:00 List-Id: On 06/29/2015 01:05 AM, Simon Wright wrote: > "Jeffrey R. Carter" writes: > >> You could also just sort the String. > > I don't see how this would work? "HELLO" sorted would become "EHLLO"; "WATER", "AERTW"; "ART", "ART". All possible random permutations of the original word. -- Jeff Carter "I did not rob a bank. If I'd robbed a bank, everything would be great. I tried to rob a bank, is what happened, and they got me. I misspelled the note." Take the Money and Run 140