how to determine the complexity of an algorithm as log(n)
Answer / karthik
log(n) is depth of binary tree containing n-elements..
so if we split array into two and omit one part and consider
another part... and continue this process.....
in problems like this the complexity will be log(n)..
Is This Answer Correct ? | 1 Yes | 1 No |
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Write a program to find the given number is odd or even without using any loops(if,for,do,while)
What are the different file extensions involved when programming in C?
Is a pointer a kind of array?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
Explain bitwise shift operators?
What is scope of variable in c?
write a “Hello World” program in “c” without using a semicolon?
What is main () in c language?
code for inverse a matrix