What is the time complexity of the following fragment of code

void testbook(int n ) {

int i, j, k;

for(i=0; i

for(j=i; j≤n-1; j++) {

for(k=1; k≤n; k=k*2) {

printf(“Hello Testbook”)  }

} } }

1
O(n log n )
2
O(n2 log n )
3
O(n3 log n )
4
O(n3)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation