Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
imglorp
· 1y ago · 0 comments
> “How can you sum the numbers from 1 to 10 without using a loop?”
Sum = n(n+1)/2
Comments
[–]
KingMob
1y ago
Yeah, I assume it's missing some context that the numeric solution was off the table.
[–]
javcasas
1y ago
When all you know is hammers, all you can think of are nails. Screws are impossible to use and understand. How are you supposed to hammer in a screw? All those ridges are in the way!
[–]
robochat
1y ago
I remember being amazed when I learnt about summing arithmetric series.
[–]
FredPret
1y ago
Not even Erlang can beat Gauss