Recent questions tagged algorithms

0 votes
1 answer
1411
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?1)QuickSort2)MergeSort3)HeapSort4)Selection Sort...
0 votes
2 answers
1413
foo(int n) { for(int i=0 ; i<n ;i++) for(int j=i ; j<=i*i ;j++) if(j%i==0) { for(int k=0;k<j;k++) printf("hii"); } } How to proceed here for analyzing the time complexity...
0 votes
1 answer
1414
15.4-1 is it right ???ans is 6 ??is there any other method to determine the lcs coz it requires time to compute till the whole traversal of matrix
0 votes
1 answer
1415
i could not remember the strassen matrix multiplication equation is it necessary to remember the equationwhich is given by https://www.geeksforgeeks.org/easy-way-remember...
0 votes
2 answers
1418
i am getting 4,3,4,3,8,2 is it right?????
1 votes
1 answer
1420
0 votes
1 answer
1421
all NP problems have the complexity exponential ???
0 votes
0 answers
1422
To prove that the time complexity of equationT(n) = T(α n) + T((1 – α)n) + βnisΘ(n logn).
0 votes
2 answers
1423
Hello anyone can help me to find big O for this algorithm please.... f=1;x=3;for (int i = 1; i <= n; i*=2) for (int j = 1; j <= i * i; j++) if (i % j == 0) ...
2 votes
1 answer
1424
What is the time Complexity of 2T(n/2) + nlogn? Can we apply Master's Theorem?
0 votes
2 answers
1426
How through a BFS we can find graph is connected or disconnected? Plz give some example and explain
0 votes
1 answer
1427
"edge disjoint spanning tree" means ?
0 votes
2 answers
1430
i am getting 100+35+50=185 is it correct ???
1 votes
1 answer
1437
0 votes
1 answer
1438
0 votes
2 answers
1439
2 votes
1 answer
1440
Given "log n" sorted lists each of size "n/log n",what is the total time required to merge them into one single list.