how to determine the complexity of an algorithm as log(n)
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between malloc() and calloc() function in c language?
What is the use of void pointer and null pointer in c language?
What is meant by inheritance?
How can I sort a linked list?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Explain what is wrong with this program statement? Void = 10;
how to find binary of number?
What is a void * in c?
What's the total generic pointer type?
How is null defined in c?
What are the advantages of union?
What is the difference between malloc calloc and realloc in c?
What is the auto keyword good for?
Which header file is used for clrscr?
Why c is called free form language?