for example if i have an algo
sum = 0
for i=1
to N do
for j=1 to i do
sum = sum + i
end
end
line 1 , performs just a single constant operation(1)line 2 , the loop it will run (n+1) (not sure ) but i am confused , 5th line will also run (n times)
but i don't get how to actually calculate and make a one formula for all that?I have seen some material but i failed to understand how it's done and it's not clearly shown :(


Sign In
Create Account


Back to top









