Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
cowsandmilk
· 11mo ago · 0 comments
How horridly inefficient, he should have just flipped a Boolean on each iteration.
Comments
[–]
kroolik
11mo ago
Horridly inefficient. Just unfold the loop.
[–]
projektfu
11mo ago
Just output odd and even for each pass and increment by two. Need to make sure you have the right starting value, and check for off-by-one errors.