Skip to content

Instantly share code, notes, and snippets.

Created February 12, 2014 13:06
What would you like to do?
Localytics Coding Challenge - Tufts Sci Fair - 2/12/2014
def it(n)
x = [*2..n]
x.each do |i|
[*(i+1)..n].each { |j| x.delete(j) if (j%i).zero? }
# 1) what does it do?
# 2) how fast is it?
# 3) can you make it faster?
# Email answers to with subject "Localytics Coding Challenge - Tufts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment