What kind of sorting is this?
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1

2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;

3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort

Answers were Sorted based on User's Feedback



What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / santhoo035

c

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / jitendra kumar arya

c)seletoin sort

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / subbu

answer is a

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

What are dangling pointers in c?

0 Answers  


What is the use of a semicolon (;) at the end of every program statement?

1 Answers  


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

0 Answers  


what is the difference between %d and %*d in c languaga?

7 Answers   TCS,


If an old women's age is the same as her three grand daughters i,mean the number of days old child=the no of weeks old child=no of months old child .The total yrs of all these ppl is 114 yrs...then how old is the old woman? the yr has 365 days..and 30 days each month.

1 Answers   TCS,






How can I access memory located at a certain address?

3 Answers   Verizon,


What is main () in c?

0 Answers  


What is typedef struct in c?

0 Answers  


Define Array of pointers.

0 Answers  


Can we write a program without main() function?

9 Answers  


Convert the following expression to postfix and prefix (A+B) * (D-C)

3 Answers   Satyam,


Write a program to know whether the input number is an armstrong number.

0 Answers   Wipro,


Categories