is it c?

The Gateway to Computer Science Excellence

0 votes

Consider the multi selection problem:

Given a set 'S' of n elements and set 'K' of 'r' ranks $K_{1}$, $K_{2}$, ....$K_{r}$. Find the $K_1^{th}$, $K_2^{th}$, ....$K_r^{th}$ smallest elements.

Example K = {3,7,10,50} the problem is to find the $3^{rd}$, $7^{th}$, $10^{th}$, $50^{th}$ smallest elements. The time complexity of the most efficient algorithm to solve this problem is

A. O(n.r)

B. O($n^2$.log r)

C. O(n)

D. O(n.log r)

Given a set 'S' of n elements and set 'K' of 'r' ranks $K_{1}$, $K_{2}$, ....$K_{r}$. Find the $K_1^{th}$, $K_2^{th}$, ....$K_r^{th}$ smallest elements.

Example K = {3,7,10,50} the problem is to find the $3^{rd}$, $7^{th}$, $10^{th}$, $50^{th}$ smallest elements. The time complexity of the most efficient algorithm to solve this problem is

A. O(n.r)

B. O($n^2$.log r)

C. O(n)

D. O(n.log r)

52,345 questions

60,503 answers

201,884 comments

95,331 users