Recent questions tagged go-alogrithms-1

2 votes
2 answers
2
3 votes
1 answer
5
Maximum element in a min-heap represented by an array, can be computed in _____ time$O(n)$$O(\log n)$$O(n \log n)$ but not $O(n)$$O(1)$
2 votes
2 answers
8
About how many compares will Quicksort() make when sorting an array of N items that are all equal?$\Theta(\lg N)$$\Theta(N\lg N)$$\Theta(\lg \lg N)$$\Theta(N/\lg N)$
2 votes
4 answers
12
Is an array that is sorted in decreasing order a max-heap?always yesalways nosometimes onlyyes but not in presence of duplicates
2 votes
1 answer
14
2 votes
1 answer
15
2 votes
1 answer
17
3 votes
1 answer
18
You are given a 1 billion numbers. The time require in seconds to sort them provided sorting thousand numbers takes 100 microseconds will be _______10,00051230065536
3 votes
1 answer
20
What is the running time of the following loop? Loop2(n) p < 1 for i < 1 to 2n do p < p*i$\Theta(n^2)$$\Theta(n)$$\Theta(n\lg n)$$\Theta(n^2\lg n)$
2 votes
2 answers
21
Consider the following recurrence relation.$$T(n) = \begin{cases}1 & \quad if \: n = 1 \\ T(n-1) + 2^n \quad & otherwise \end{cases}$$What will be the value of $T(10)$?
3 votes
1 answer
22
2 votes
1 answer
25
3 votes
2 answers
29
4 votes
2 answers
30
For the following program fragment, the running time is given byProcedure A(n) { if(n <= 2) return 1; else return A(log (n)); }$\Theta(\log \log n)$$\Theta(\log \sqrt n)$...
To see more, click for the full list of questions or popular tags.