491 views
0 votes
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)

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
Neelu Lalchandani asked Nov 2, 2022
345 views
Time Complexity in C will be O(n) right? and big omega (n) is also big omega (n^2), then why is c incorrect?
0 votes
0 votes
0 answers
2
1 votes
1 votes
1 answer
3
phaneendrababu asked Sep 20, 2018
744 views
Can anyone explain me the answer in detail?
1 votes
1 votes
2 answers
4
Ayush_Pal asked Apr 26
170 views
#include<stdio.h>#define ADD(a,b)(a+b)#define SQUARE(x)(x*x)int main(){int x=2;int y=3;int z = ADD(SQUARE(x++),y);printf("%d\n",z);return 0;}What is the output of the abo...