edited by
2,078 views
1 votes
1 votes

Match the following $:$

$\begin{array}{}  & \textbf{List – I} &  & \textbf{List – II} \\ \text{a.} & \text{Bucket sort} & \text{i.} & O(n^3\lg n)  \\ \text{b.} & \text{Matrix chain multiplication} & \text{ii.} & O(n^3) \\  \text{c.} & \text{Huffman codes} & \text{iii.} & O(n\lg n) \\ \text{d.} & \text{All pairs shortest paths} & \text{iv.} & O(n) \\  \end{array}$

$\textbf{Codes :}$

  1. $\text{a-iv, b-ii, c-i, d-iii}$
  2. $\text{a-ii, b-iv, c-i, d-iii}$
  3. $\text{a-iv, b-ii, c-iii, d-i}$
  4. $\text{a-iii, b-ii, c-iv, d-i}$
edited by

1 Answer

3 votes
3 votes

Bucket sort  = O(n)

Matrix chain multiplication = O(n3)

Huffman codes =O(n logn)

All pairs shortest paths = O(n3logn)

Ans is (C).

Answer:

Related questions

1 votes
1 votes
1 answer
3
makhdoom ghaya asked Jul 28, 2016
3,633 views
We can show that the clique problem is $NP$-hard by proving thatCLIQUE $\leq$ P 3-CNF_SATCLIQUE $\leq$ P VERTEX_COVERCLIQUE $\leq$ P SUBSET_SUMNone of the above
3 votes
3 votes
2 answers
4
makhdoom ghaya asked Jul 28, 2016
1,917 views
Any decision tree that sorts $n$ elements has height$\Omega(n)$$\Omega(\text{lg}n)$$\Omega(n \text{lg} n)$$\Omega(n^2)$