Q2-iiiNATMarks unknownMatch the pairs in the following: (A)O(logn)(p)Heapsort(B)O(n)(q)Depth-first search(C)O(nlogn)(r)Binary search(D)O(n2)(s)Selection of the kth smallest elementin a set of n elements\begin{array}{|ll|ll|}\hline \text{(A)} & \text{$O (\log n)$} & \text{(p)} & \text{Heapsort} \\\hline \text{(B)} & \text{$O (n)$} & \text{(q)}& \text{Depth-first search} \\\hline \text{(C)}& \text{$O (n \log n)$} & \text{(r)} & \text{Binary search} \\\hline \text{(D)} & \text{$O (n^2)$} &\text{(s)} & \text{Selection of the $k^{th}$ smallest element} \\& \text{} & & \text{in a set of n elements} \\\hline \end{array}(A)(B)(C)(D)O(logn)O(n)O(nlogn)O(n2)(p)(q)(r)(s)HeapsortDepth-first searchBinary searchSelection of the kth smallest elementin a set of n elementsSign in to save attempts.Show answer← PreviousNext →SolutionsDiscussionLoading…Sign in with Google