Recent questions tagged cormen

0 votes
0 answers
32
0 votes
0 answers
36
0 votes
1 answer
37
0 votes
1 answer
38
0 votes
1 answer
42
0 votes
0 answers
44
0 votes
1 answer
46
1 votes
1 answer
47
0 votes
1 answer
50
0 votes
1 answer
52
0 votes
1 answer
53
QUICKSORT(A,p,r) 1 if p < r 2 q = PARTITION(A,p,r) 3 QUICKSORT(A, p , q-1) 4 QUICKSORT(A, q + 1, r)How would you modify QUICKSORT to sort into nonincreasing order?
0 votes
1 answer
54
0 votes
1 answer
55
0 votes
0 answers
57
Give an $O(n\lg\ k)$- time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a minhea...
0 votes
1 answer
58
The operation HEAP-DELETE$(A, i)$ deletes the item in node $i$ from heap $A$. Give an implementation of HEAP-DELETE that runs in $O(lg\ n)$ time for an $n-$element max-h...
0 votes
0 answers
59
0 votes
0 answers
60