edited by
2,200 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

1 1 vote
1 1 answer
117
117 views
GO Classes asked Aug 31
117 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
92
92 views
GO Classes asked Aug 29
92 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
65
65 views
GO Classes asked Aug 26
65 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
375
375 views
KrishnaVardhan asked Oct 7, 2024
375 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...