Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
moi2388
· 4mo ago · 0 comments
My algorithm is O(n+n+..n) which is O(n), since there we also ignore addition fortunately :D
Comments
[–]
AlotOfReading
4mo ago
It would only be O(n) if the number of additions was constant. Here it varies with the size of the multiplier, giving us O(n*m).