logo       

Re: Coding challenge (on Ruby Garden): msg#00801

lang.ruby.general

Subject: Re: Coding challenge (on Ruby Garden)

"George Ogata" <g_ogata@xxxxxxxxxxxxxxxx> wrote
....
> Hope I didn't keep you waiting too long... ;)
>
> one_in_each([1,2,3,4],[[1,3,4],[1,2,3,4],[2,3,4],[]])
>
> should be false.

Your solution fails, i.e. it returns false, for

items = [1,2,2]
row = [1,2]
rows = [ row, row, [1,3]]


/Christoph





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise