Question: Assuming n and i are integer variables and n was assigned a positive integer, the big - O of the following algorithm is _ _
Assuming n and i are integer variables and n was assigned a positive integer, the bigO of the following algorithm is
i n;
table row blank blank end tablewhile i
table row blank end table
table row blank blank end table cout i endl;
table row blank blank end tabletable row blank end tablei ;
table row blank end table
Ologn
On
On squared
O to the power of n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
