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
Is c language still used?
Why pointers are used?
Why do we use namespace feature?
explain what is an endless loop?
How can you allocate arrays or structures bigger than 64K?
What is the size of a union variable?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What is the size of array float a(10)?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
When should you not use a type cast?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What are global variables and explain how do you declare them?
How to declare a variable?