Recent questions tagged algorithms

0 votes
0 answers
1444
The number of possible min-heaps containing each value from {1,1,1,1,1,1,1} exactly once is _______This is a variance of Gate 2018 question and how will we deal if all va...
0 votes
1 answer
1445
0 votes
0 answers
1446
1 votes
1 answer
1447
In a binary Heap of 100 elements time taken to find the 99th element?or in a binary heap on "n" elements, time taken to find (n-1)th element? Note ; I'm not asking about ...
1 votes
0 answers
1448
0 votes
1 answer
1449
0 votes
1 answer
1452
2 votes
1 answer
1453
Which of the given options provides the increasing order of asymptotic complexity of functions $f1$, $f2$, $f3$ and $f4$? $f1(n) = 2^n \\ f2(n) = n^{(3/2)} \\ f3(n) = nl...
0 votes
1 answer
1454
what is the time complexity of the $pow(m,n)$ ?
0 votes
0 answers
1455
Successful Search we assume that the probability of searching or finding an element at each location is same , then if we have n elements so probability is $1/n$...Also w...
0 votes
1 answer
1456
$T(n) = T(n-2) + 2logn, \text{ if } n>1 \\ =1, \text{ if } n=1$Find the Time Complexity.
0 votes
1 answer
1457
1 votes
0 answers
1458
What will be the time complexity of the following algorithm ?A(n){if(n<=1) return 1;for(i=1;i<n;i++){ for(j=0;j<3;j++){ A(n-1) } }}
0 votes
1 answer
1459
let T be a minimum cost spanning tree of G. suppose that ewe decreased the weight of one of the edge in T.then to check modified T is MST or not how much tym will take???...
0 votes
0 answers
1460
You are asked to sort 15 randomly generated numbers. One should prefer - 1. Bubble Sort2. Quick Sort3. Merge Sort4. Heap Sort Please explain why others 3 sorting algorith...
0 votes
0 answers
1461
How "a fibonacci algorithm runs in polynomial time in n but the optimal running time is exponential in n."?Is it possible to running same algorithm in both polynomial and...
0 votes
1 answer
1462
An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither 2nd maximum nor 2nd minimum isΘ(nlogn)Θ(n)Θ(l...
0 votes
0 answers
1463
I am getting confused among the terms : Backtracking, Branch and Bound Paradigm, Dynamic Programming and Greedy Algorithm.Can anyone tell their similarities and differenc...
0 votes
0 answers
1465
how does linux kernel uses the red black tree property ???elabourate
0 votes
0 answers
1466
0 votes
1 answer
1467
Given an sorted array in descending order, what will be the time complexity to delete the minimum element from this array?
0 votes
2 answers
1468
In GATE 1987 question, order of $\Sigma$$O(n)$ was found to be $O(n^2)$.Similarly, what will be the answer for order of $\Sigma$$O(n^2)$ ? Will it be of $O(n^3)$ ?Thanks...
0 votes
0 answers
1469
What is the time complexity of the following piece of code in the terms of n?$Main()${$n=2^{2^k};$$for(i=1; i<=n; i++)${ $j=2;$ $while(j<=n)$ { $j=j^2;$ }}...