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 |
What is integer constants?
Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0
What is identifier in c?
What does c value mean?
What is fflush() function?
What is scanf () in c?
what is dangling pointer?
How to calculate Total working time using Login and logout?
2 Answers CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,
WHAT IS LOW LEVEL LANGUAGE?
Is fortran faster than c?
What is meant by gets in c?
Why static variable is used in c?