Remarkably few solutions implement the obvious, time-optimal strategy switching on the remainder modulo 3*5 = 15 . Faced with this problem in an interview, my response would be to ask in what proportions the solution was required to optimise time, space, effort, elegance, readability, portability, etc. I wouldn't get the job --- but probably wouldn't want it anyway! WFL On 5/22/15, Ray Tayek <rtayek@ca.rr.com> wrote:
On 5/21/2015 1:00 PM, rkg wrote:
When I taught in what you would call a grade school, 76 years ago, I used the last 5 mins of each class to play ``fizz-buzz'' :-
one,two,three,four,fizz,six,buzz,eight,nine,fizz,eleven,twelve,thirteen, buzz,fizz,sixteen,buzzteen,eighteen,nineteen,fizz,buzz,twentytwo,...
thirtyfive was fizzbuzz, etc. It had the advantage that it kept all the class thinking, as those who had dropped out were eager to catch mistakes by those still in ... R.
i wonder if the fizz buzz test <http://c2.com/cgi/wiki?FizzBuzzTest> came from the same place?
thanks
-- Honesty is a very expensive gift. So, don't expect it from cheap people - Warren Buffett http://tayek.com/
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun