You're viewing a comment by kourge and its responses.

June 09, 2008, 08:03

I used Python to solve this:
http://kourge.net/node/116

The need to write code for doing list intersections was a bit ugly; if I were using Ruby it wouldn't have needed an "intersection" function because consecutives.inject(:"&") would have done the job, although I'm not sure if Ruby's built-in & method is efficient enough.

My implementation runs about 7 seconds for five conditions. ([3, 5, 143, 865, 1089] => [5990183])

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type first 3 letters of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.