edited by
349 views
0 0 votes

(a) $\alpha\left(n^{2}\right)$
(b) $\alpha(n)$
(c) $O(n \log n)$
(d) $O\left(n^{2} \log n\right)$
Q. 6 Consider the following sorting algorithm.

I
\[
\begin{array}{l}
\text { ting }(A, \text { low, high }) \\
\text { if }(\text { low }=\text { high }) \text { return; } \\
\text { if }(\text { low }+1=\text { high }) \\
\text { if }(\text { Allow }]>A[\text { high }]) \\
\quad \text { Swap }(A[l o w], A[\text { high }]) ; \\
\text { return; } \\
t_{1}=\text { low }+\left(\frac{\text { high }- \text { low }+1}{3}\right) ; \\
t_{2}=\text { low }+2 \cdot\left(\frac{\text { high }- \text { low }+1}{3}\right) \text {; }
\end{array}
\]

Sorting ( $A$, low, $t_{2}$ );
Sorting ( $A, t_{1}$, high);
Sorting ( $A$, low, $t_{2}$ );
\}
What is the running time of $\operatorname{Sorting}(A, 1, n)$ function.
(a) $\Theta\left(n^{1.7}\right)$
(b) $\Theta\left(n^{27}\right)$
(c) $\Theta\left(n^{37}\right)$
(d) $\Theta\left(n^{0.7}\right)$
Q. 7 Which of the following is/are true?

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
5.1k
5.1k views
shgarg asked Nov 5, 2018
5,066 views
Suppose a binary tree has only three nodes A, B and C and you are given that the post-order traversal for the tree is B-A-C. The exact preorder traversal for the tree is....
0 0 votes
2 2 answers
817
817 views
Vashishtha asked Sep 9, 2023
817 views
In a certain base 137 + 254 = 402 then What is the sum of 342 + 562 in that base?
0 0 votes
1 1 answer
449
449 views
Vashishtha asked Sep 7, 2023
449 views
How many factors ofN=12^12×14^14×15^15are multiple ofK=12^10×14^10×15^10 ?
0 0 votes
0 0 answers
380
380 views
Vashishtha asked Sep 4, 2023
380 views
If 1/n + 1 < 1/n+1 + 1 / n + 2 + 1/ n + 3 < ; then n ?a) 9 c) 11b) 10 d) 12