GATE 2015CS/IT C PROGRAMMING| int fun1(int n) Approximate return value of function | int i,j,k,p,q=0

preview_player
Показать описание
Gate 2015 time complexity question
GATE 2015 Consider the following C function.
int fun1 (int n) {
int i, j, k, p, q = 0;
for (i = 1; i n; ++i)
{ p = 0;
for (j = n; j 1; j = j/2) ++p;
for (k = 1; k p; k = k * 2) ++q;}
return q;}
Which one of the following most closely approximates the return value of the function fun1?
a)n3
b)n(logn)2
c)nlogn
d)nlog(logn)
For any queries feel free to comment or direct message on Instagram
Playlist link -
GATE 2015
QUESTION ON TIME COMPLEXITY
QUESTIONS ON C PROGRAM OUTPUT

C PROGRAMMING OUTPUT
ALGORITHMS
time complexity
theta
BIG O
OMEGA
TIME AND SPACE COMPLEXITY
DOUBLE HASHING
QUADRATIC PROBING
linked list for gate
PYQ
LINEAR PROBING
COLLISION
HASHING
net
B.tech
university
placement preparation
doubly linked list
GATE 2021
#gate
#jatin_gupta_gate
#gate2023
visit shbcf.ru