POV-Ray : Newsgroups : povray.general : Sort : Re: Sort Server Time
8 Aug 2024 18:15:43 EDT (-0400)
  Re: Sort  
From: Jan Walzer
Date: 2 Jan 2001 16:09:01
Message: <3a52436d$1@news.povray.org>
hehe ... ever tried to implement BOZO-Sort ???

I've heard about it and laught...

Goes like this:

1) test if the array is in the order.
2) if not then
3) a=rand(Arraysize)
4) b=rand(Arraysize)
5) swap(a,b)
6) goto 1
7) else ready

... the one who told me about that said also something that prooves, the
termination of the algorithm' if a GOOD! randomizer is used ...

I don't really know, but I think it has a kewl runtime ;-)

--
Jan Walzer


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.