Algorithm Analysis

Time : 21:22
Y is the for loop having n times
it is from this place

First Line…
it says that first the j is given a value j= 2
then it goes till j=n.
nd it is checked at j = n+1
i say that incrementing is a primitive operation nd so is checking so their times have not been considered y ?
the total time should have been j=like 3n or maybe higher which includes time of incrementing , assigning , checking

This forum is not about solving your homework … and if you want us to really help you must straight away ask the doubts with some short snip or questions …Posting the link for Videos won’t help much

1 Like