A collection of "interesting" data structure and algorithm questions
What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2.
void
fun()
{
int
i, j;
for
(i=1; i<=n; i++)
(j=1; j<=
log
(i); j++)
printf
(
"GeeksforGeeks"
);
}
No comments:
Post a Comment