|
RE: Coding challenge (on Ruby Garden): msg#00785lang.ruby.general
David Naseby wrote: >> From: George Ogata [mailto:g_ogata@xxxxxxxxxxxxxxxx] >> This bit looks strange to me, though: >> >> if (arr_of_arr.length - (arr_of_arr - arr).length) > arr.length >> ^^^^^^^^^^^^^^^^ > > Of course, you are right.. this line should be > if (arr_of_arr.length - (arr_of_arr.delete_if{|a| a == arr}) > arr.length > > with this change, this latest failure passes. Can't wait for the next one > ;) > > David 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.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: print vs puts behaviour for overloaded Array#to_s, ts |
|---|---|
| Next by Date: | Re: Variable validation, George Ogata |
| Previous by Thread: | RE: Coding challenge (on Ruby Garden), David Naseby |
| Next by Thread: | Re: Coding challenge (on Ruby Garden), Christoph |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |