From: Ryan Leavengood Date: 2005-12-05T06:11:17+09:00 Subject: Re: Weird Numbers (#57) Solution On 12/4/05, Hampton wrote: > I did mine with a good dose of humor. Hehehe, I could see that a bit. > I certainly know that my weirdo_exhaustive is slow... hell, I called it > both "weirdo" and "exhaustive". However, I thought of the fast solution > as a bit of humor for everyone to enjoy. I do think it has merit in > *some* ways only because its damn hard to make anything go faster than > that. Well there is no doubt that in a real application there would be a cache for weird numbers, should that application need them frequently. > I did not mean any previous comments to be "i'm better than you" in any > real way. They were all made tounge in cheek because of course just > accessing an array is going to be orders of magnatude faster. Fair enough, and I would have appreciated the solution more had it been correct. > These quizes are not for points and there is no "winner" (at least not > that i've seen assigned in previous iterations of the quiz. In fact, > there is never any qualifications for what makes the best one! Of course, but quizzes like this benefit from analyzing which algorithms are the fastest. This one in particular had a HUGE margin between the fast and slow solutions. Other quizzes are more about the structure of the code and solving the problem elegantly, and you won't see me or anyone else getting out the benchmarking tools. > And yes, I did use the wrong number set. I found the number set for > primitive weird numbers, not exhaustive. > > I used this: > http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A002975 > As opposed to this: > http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A006037 > > My mistake.... I see, easy enough mistake to make I suppose. > But, lets all be friends! How about a beer? Don't take my criticism as being hostile. In fact if you read this list you'll find me most helpful when newbies have problems. But I don't hesitate to tell people when they are wrong. A beer would be fine if you happen to live where I am, in South Florida ;) Ryan