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
Why do we use c for the speed of light?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
How can my program discover the complete pathname to the executable from which it was invoked?
Can the “if” function be used in comparing strings?
What is c method?
Explain why can’t constant values be used to define an array’s initial size?
What is the basic structure of c?
How is pointer initialized in c?
If you know then define #pragma?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
What is the role of this pointer?
List some applications of c programming language?
What is the significance of an algorithm to C programming?
How can you be sure that a program follows the ANSI C standard?
What is calloc in c?