Hacker News new | ask | show | jobs
by awaage 5463 days ago
how about this (example in ruby): def plus_1(x); arr = []; arr[x] = true; return arr.size; end
1 comments

Funny, this is the first thing I thought of, but then realized it would only work if x>0
oops! good catch!
lol .. but also wont work for decimals