Recent questions tagged algorithms

2 votes
1 answer
3185
18 votes
3 answers
3186
Consider the quick sort algorithm on a set of $n$ numbers, where in every recursive subroutine of the algorithm, the algorithm chooses the median of that set as the pivot...
1 votes
1 answer
3195
Assume 5 buffer pages are available to sort a file of 105 pages.The cost of sorting using m-way merge sort is- a)206b)618c)840d)926
3 votes
1 answer
3196
2 votes
3 answers
3198
int Test(int n) { if (n<=0) return 0; else { int i = random(n-1); return Test(i) + Test(n-1-i); } }Suppose the function $\text{random}()$ takes constant time, then what ...
4 votes
2 answers
3201
2 votes
1 answer
3202
2 votes
1 answer
3206
3 votes
2 answers
3208
Number of comparisons required for an unsuccessful search of an element in a sequential search organized, fixed length, symbol table of length L isLL/2(L+1)/22L
0 votes
1 answer
3209
which is true please explain...f(n)=O(f.(n)2).if f(n)=Og(n) then 2f(n)=O(2g(n)).2n≄O(nk) where k is constant.lognlogn>2logn>nlogn
–1 votes
3 answers
3210