Tuesday, May 22, 2012

What's the theoretical complexity of this algorithm?

fun(double x, int y){
if (int == 0){
return 1.0;
} else {
return fun(x, y/2) * fun(x, y/2);
}
}


How can I find the theoretical complexity?
+ What's the difference between the big O and the theta-notation?



Thanks





No comments:

Post a Comment