Q6
Which one of the following is the tightest upper bound that represents the number of swaps required to sort numbers using selection sort?
Show answer without attempting
Answer: B
GATE CS · 5 questions
5 Algorithms questions from GATE CS papers (2013), each with the official answer key. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: B
Answer: A
Answer: C
Answer: C
int unknown(int n){
int i, j, k=0;
for (i=n/2; i<=n; i++)
for (j=2; j<=n; j=j*2)
k = k + n/2;
return (k);
}Answer: B
0/50 correct0 marks