• edited by
2,247 views
4 4 votes

//n is a prime number here

int main()
{
    for(i=1;i<=n;i=2*i)
       {
             for(j=1;j<=n;j++)
               {
                 if(n%i==0)
                   {
                        k=1;
                      while(k<=n)
                        {
                       a=b+c;
                       k=k+1;
                        }
                   }
               }
         }
}

Please log in or register to answer this question.

Position:
Show:

Related questions

2 2 votes
1 1 answer
161
161 views
GO Classes asked Aug 31
161 views
The algorithm $\text{ALGSORT}$ sorts an array of distinct integers using comparisons.The function $\text{MININDEX(V,i,j)}$ returns the position of the smallest element in...
1 1 vote
1 1 answer
107
107 views
GO Classes asked Aug 29
107 views
Suppose Huffman coding is implemented as follows.Initially, the $n$ symbols are stored in a min priority queue according to their frequencies.The algorithm repeatedly per...
0 0 votes
1 1 answer
89
89 views
GO Classes asked Aug 26
89 views
Consider,f1(N): x = 0 for i = 0 to N - 1: x++ return xand,f2(N, R): x = 0 for i = 0 to N - 1: for j = 1; j <= R; j = j + j: x = x + f1(j) return xWhat is the order of gro...
2 2 votes
1 1 answer
379
379 views
KrishnaVardhan asked Oct 7, 2024
379 views
Even though there are two for loops some times the Time complexity will be the m+n and some times it will be m*n assuming loops run till m and n respectively.How do we di...