int unknown(int n){
int i, j, k=0;
for (i=n/2; i<=n; i++)
for (j=2; j<=n; j=j*2)
k = k + n/2;
return (k);
}Related Algorithms PYQs
Two alternative packages A and B are available for processing a database having 10k records. Package A requires 0.0001n² time unit…
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using select…
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
The number of elements that can be sorted in Θ(log n) time using heap sort is
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter. MultiDequeue(…
Free account benefits
Turn practice into measurable progress
Public PYQs and reference pages stay free. Sign in when you want GATEverse to remember what you studied and guide what to practise next.