lucky_ali0926 0 Newbie Poster

<<split from here>>

hi there ......

i am also trying to compute the time complexity for the same code that aisha have mentioned...

as for as while loop is concerned i think that if the iteration is simple like i++ then the run time is O(N)

but what if iteration is not simple ........what if its like i=i*3

for example if n=27 then there will be iteration in a manner like ...... 1 , 3 , 9 , 27 ........i am just confused..............

please help me out with this

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.